From ff6e6577d7fdfb80488884725933768932639719 Mon Sep 17 00:00:00 2001 From: Blazebrain Date: Wed, 11 Dec 2024 17:21:45 +0100 Subject: [PATCH] Fix: Adjust UI styling for seed page --- ios/Podfile.lock | 38 ------ lib/src/screens/seed/wallet_seed_page.dart | 148 +++++++++++---------- 2 files changed, 77 insertions(+), 109 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8046ba3079..771bd42ce6 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,38 +3,8 @@ PODS: - Flutter - ReachabilitySwift - CryptoSwift (1.8.3) - - cw_haven (0.0.1): - - cw_haven/Boost (= 0.0.1) - - cw_haven/Haven (= 0.0.1) - - cw_haven/OpenSSL (= 0.0.1) - - cw_haven/Sodium (= 0.0.1) - - cw_shared_external - - Flutter - - cw_haven/Boost (0.0.1): - - cw_shared_external - - Flutter - - cw_haven/Haven (0.0.1): - - cw_shared_external - - Flutter - - cw_haven/OpenSSL (0.0.1): - - cw_shared_external - - Flutter - - cw_haven/Sodium (0.0.1): - - cw_shared_external - - Flutter - cw_mweb (0.0.1): - Flutter - - cw_shared_external (0.0.1): - - cw_shared_external/Boost (= 0.0.1) - - cw_shared_external/OpenSSL (= 0.0.1) - - cw_shared_external/Sodium (= 0.0.1) - - Flutter - - cw_shared_external/Boost (0.0.1): - - Flutter - - cw_shared_external/OpenSSL (0.0.1): - - Flutter - - cw_shared_external/Sodium (0.0.1): - - Flutter - device_display_brightness (0.0.1): - Flutter - device_info_plus (0.0.1): @@ -136,9 +106,7 @@ PODS: DEPENDENCIES: - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - CryptoSwift - - cw_haven (from `.symlinks/plugins/cw_haven/ios`) - cw_mweb (from `.symlinks/plugins/cw_mweb/ios`) - - cw_shared_external (from `.symlinks/plugins/cw_shared_external/ios`) - device_display_brightness (from `.symlinks/plugins/device_display_brightness/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - devicelocale (from `.symlinks/plugins/devicelocale/ios`) @@ -179,12 +147,8 @@ SPEC REPOS: EXTERNAL SOURCES: connectivity_plus: :path: ".symlinks/plugins/connectivity_plus/ios" - cw_haven: - :path: ".symlinks/plugins/cw_haven/ios" cw_mweb: :path: ".symlinks/plugins/cw_mweb/ios" - cw_shared_external: - :path: ".symlinks/plugins/cw_shared_external/ios" device_display_brightness: :path: ".symlinks/plugins/device_display_brightness/ios" device_info_plus: @@ -239,9 +203,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483 - cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a cw_mweb: 87af74f9659fed0c1a2cbfb44413f1070e79e3ae - cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7 device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 devicelocale: 35ba84dc7f45f527c3001535d8c8d104edd5d926 diff --git a/lib/src/screens/seed/wallet_seed_page.dart b/lib/src/screens/seed/wallet_seed_page.dart index 9f9cc02699..ae2d8bde6c 100644 --- a/lib/src/screens/seed/wallet_seed_page.dart +++ b/lib/src/screens/seed/wallet_seed_page.dart @@ -92,17 +92,18 @@ class WalletSeedPage extends BasePage { @override Widget body(BuildContext context) { return WillPopScope( - onWillPop: () async => false, - child: Container( - padding: EdgeInsets.all(24), - alignment: Alignment.center, - child: ConstrainedBox( - constraints: - BoxConstraints(maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Observer(builder: (_) { + onWillPop: () async => false, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8), + alignment: Alignment.center, + child: ConstrainedBox( + constraints: + BoxConstraints(maxWidth: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Observer( + builder: (_) { return Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -151,12 +152,11 @@ class WalletSeedPage extends BasePage { SizedBox(height: 24), Expanded( child: GridView.builder( - physics: const NeverScrollableScrollPhysics(), padding: const EdgeInsets.symmetric(horizontal: 4), itemCount: walletSeedViewModel.seedSplit.length, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: walletSeedViewModel.columnCount, - childAspectRatio: 3, + childAspectRatio: 3.6, mainAxisSpacing: 8.0, crossAxisSpacing: 8.0, ), @@ -165,25 +165,29 @@ class WalletSeedPage extends BasePage { final numberCount = index + 1; return Container( - padding: const EdgeInsets.symmetric(horizontal: 12), + padding: const EdgeInsets.symmetric(horizontal: 4), alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(24), + borderRadius: BorderRadius.circular(8), color: Theme.of(context).extension()!.indicatorsColor, ), child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( - numberCount.toString(), - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w700, - color: Theme.of(context) - .extension()! - .textColor - .withOpacity(0.6), + SizedBox( + width: 20, + child: Text( + numberCount.toString(), + textAlign: TextAlign.right, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w700, + color: Theme.of(context) + .extension()! + .textColor + .withOpacity(0.6), + ), ), ), const SizedBox(width: 8), @@ -206,59 +210,61 @@ class WalletSeedPage extends BasePage { ], ), ); - }), - Column( - children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Flexible( - child: Container( - padding: EdgeInsets.only(right: 8.0), - child: PrimaryButton( - key: ValueKey('wallet_seed_page_save_seeds_button_key'), + }, + ), + Column( + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Flexible( + child: Container( + padding: EdgeInsets.only(right: 8.0), + child: PrimaryButton( + key: ValueKey('wallet_seed_page_save_seeds_button_key'), + onPressed: () { + ShareUtil.share( + text: walletSeedViewModel.seed, + context: context, + ); + }, + text: S.of(context).save, + color: Theme.of(context).primaryColor, + textColor: currentTheme.type == ThemeType.dark + ? Theme.of(context).extension()!.textColor + : Colors.white, + ), + ), + ), + Flexible( + child: Container( + padding: EdgeInsets.only(left: 8.0), + child: Builder( + builder: (context) => PrimaryButton( + key: ValueKey('wallet_seed_page_copy_seeds_button_key'), onPressed: () { - ShareUtil.share( - text: walletSeedViewModel.seed, - context: context, + ClipboardUtil.setSensitiveDataToClipboard( + ClipboardData(text: walletSeedViewModel.seed), ); + showBar(context, S.of(context).copied_to_clipboard); }, - text: S.of(context).save, - color: Theme.of(context).primaryColor, - textColor: currentTheme.type == ThemeType.dark - ? Theme.of(context).extension()!.textColor - : Colors.white, + text: S.of(context).copy, + color: Theme.of(context).extension()!.indicatorsColor, + textColor: + Theme.of(context).extension()!.textColor, ), ), ), - Flexible( - child: Container( - padding: EdgeInsets.only(left: 8.0), - child: Builder( - builder: (context) => PrimaryButton( - key: ValueKey('wallet_seed_page_copy_seeds_button_key'), - onPressed: () { - ClipboardUtil.setSensitiveDataToClipboard( - ClipboardData(text: walletSeedViewModel.seed), - ); - showBar(context, S.of(context).copied_to_clipboard); - }, - text: S.of(context).copy, - color: Theme.of(context).extension()!.indicatorsColor, - textColor: - Theme.of(context).extension()!.textColor, - ), - ), - ), - ) - ], - ), - SizedBox(height: 24), - ], - ) - ], - ), + ) + ], + ), + SizedBox(height: 24), + ], + ) + ], ), - )); + ), + ), + ); } }