handle unlimited

This commit is contained in:
Hiddify
2023-09-10 12:46:22 +02:00
parent d5e65a5c41
commit 7920cb7c06
4 changed files with 23 additions and 8 deletions

View File

@@ -305,13 +305,17 @@ class ProfileSubscriptionInfo extends HookConsumerWidget {
final theme = Theme.of(context);
final remaining = remainingText(t, theme);
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
subInfo.consumption.sizeOf(subInfo.total),
style: theme.textTheme.bodySmall,
Directionality(
textDirection: TextDirection.ltr,
child: Text(
subInfo.total > 10 * 1099511627776 //10TB
? "∞ GiB"
: subInfo.consumption.sizeOf(subInfo.total),
style: theme.textTheme.bodySmall,
),
),
Text(
remaining.$1,