mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-06 08:06:47 +00:00
TF-4861 Accept num sizes in LocalizedFileSizeFormatter
UnsignedInt.value is typed num, which broke compilation of quota extensions. Accept num and normalize to an integer byte count. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
97baa1e0b7
commit
f3be3cd84c
1 file changed
+2
-1
@@ -13,7 +13,8 @@ class LocalizedFileSizeFormatter {
|
||||
|
||||
const LocalizedFileSizeFormatter._();
|
||||
|
||||
static String format(int size, {int fractionDigits = 2, String? locale}) {
|
||||
static String format(num bytes, {int fractionDigits = 2, String? locale}) {
|
||||
final size = bytes.toInt();
|
||||
final resolvedLocale = _resolveLocale(locale ?? Intl.getCurrentLocale());
|
||||
final units = _unitsFor(resolvedLocale);
|
||||
|
||||
|
||||
Reference in new issue
Block a user