Skip to content

Commit

Permalink
Fix: Adjust UI styling for seed page
Browse files Browse the repository at this point in the history
  • Loading branch information
Blazebrain committed Dec 11, 2024
1 parent 2d53d82 commit ff6e657
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 109 deletions.
38 changes: 0 additions & 38 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
148 changes: 77 additions & 71 deletions lib/src/screens/seed/wallet_seed_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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: <Widget>[
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: <Widget>[
Observer(
builder: (_) {
return Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down Expand Up @@ -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,
),
Expand All @@ -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<PinCodeTheme>()!.indicatorsColor,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
numberCount.toString(),
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
color: Theme.of(context)
.extension<DashboardPageTheme>()!
.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<DashboardPageTheme>()!
.textColor
.withOpacity(0.6),
),
),
),
const SizedBox(width: 8),
Expand All @@ -206,59 +210,61 @@ class WalletSeedPage extends BasePage {
],
),
);
}),
Column(
children: <Widget>[
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Flexible(
child: Container(
padding: EdgeInsets.only(right: 8.0),
child: PrimaryButton(
key: ValueKey('wallet_seed_page_save_seeds_button_key'),
},
),
Column(
children: <Widget>[
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
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<DashboardPageTheme>()!.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<void>(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<DashboardPageTheme>()!.textColor
: Colors.white,
text: S.of(context).copy,
color: Theme.of(context).extension<PinCodeTheme>()!.indicatorsColor,
textColor:
Theme.of(context).extension<DashboardPageTheme>()!.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<void>(context, S.of(context).copied_to_clipboard);
},
text: S.of(context).copy,
color: Theme.of(context).extension<PinCodeTheme>()!.indicatorsColor,
textColor:
Theme.of(context).extension<DashboardPageTheme>()!.textColor,
),
),
),
)
],
),
SizedBox(height: 24),
],
)
],
),
)
],
),
SizedBox(height: 24),
],
)
],
),
));
),
),
);
}
}

0 comments on commit ff6e657

Please sign in to comment.