From 1c2f25a152b12de137dffb94d6b9fc27867567d7 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 24 Sep 2025 21:21:51 +0800 Subject: [PATCH] :lipstick: Optimize leveling page --- lib/screens/account/leveling.dart | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/lib/screens/account/leveling.dart b/lib/screens/account/leveling.dart index f985e853..dd1dc37d 100644 --- a/lib/screens/account/leveling.dart +++ b/lib/screens/account/leveling.dart @@ -148,7 +148,6 @@ class LevelingScreen extends HookConsumerWidget { return Center( child: Container( padding: const EdgeInsets.symmetric(horizontal: 20), - constraints: const BoxConstraints(maxWidth: 480), child: CustomScrollView( slivers: [ const SliverGap(20), @@ -180,6 +179,12 @@ class LevelingScreen extends HookConsumerWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ + Text( + '${'levelingProgressLevel'.tr(args: [currentLevel.toString()])} / 120', + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall, + ), + const Gap(8), LinearProgressIndicator( value: currentLevel / 120, minHeight: 10, @@ -190,12 +195,6 @@ class LevelingScreen extends HookConsumerWidget { Theme.of(context).colorScheme.surfaceContainerHigh, borderRadius: BorderRadius.circular(32), ), - const Gap(8), - Text( - '${'levelingProgressLevel'.tr(args: [currentLevel.toString()])} / 120', - textAlign: TextAlign.right, - style: Theme.of(context).textTheme.bodySmall, - ), ], ).padding(horizontal: 16, top: 16, bottom: 12), ), @@ -272,17 +271,12 @@ class LevelingScreen extends HookConsumerWidget { return SingleChildScrollView( padding: getTabbedPadding(context, horizontal: 20, vertical: 20), - child: Center( - child: ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 480), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - _buildMembershipSection(context, ref, stellarSubscription), - const Gap(16), - ], - ), - ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + _buildMembershipSection(context, ref, stellarSubscription), + const Gap(16), + ], ), ); }