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:
Benoit TELLIERandClaude Opus 5.5 authored and Dat H. Pham committed 2026-09-29 16:30:57 +07:00
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);