diff --git a/lib/utils/new_wallet/info_page.dart b/lib/utils/new_wallet/info_page.dart index d14e5b4..6b23db5 100644 --- a/lib/utils/new_wallet/info_page.dart +++ b/lib/utils/new_wallet/info_page.dart @@ -84,7 +84,7 @@ class NewWalletInfoPage { required final String title, }) => NewWalletInfoPage( - topText: L.seed, + topText: L.verify_seed, topAction: null, topActionText: null, svgIcon: null, @@ -110,12 +110,10 @@ class NewWalletInfoPage { ), ], texts: [ - SizedBox(height: 16), YellowWarning( text: L.save_words_warning, padding: EdgeInsets.zero, ), - SizedBox(height: 32), Text( title, style: TextStyle( @@ -123,9 +121,7 @@ class NewWalletInfoPage { color: T.colorScheme.onSurface, ), ), - SizedBox(height: 16), SeedPhraseGridWidget(list: text.split(" ")), - Spacer(), ], ); diff --git a/lib/views/animated_qr_page.dart b/lib/views/animated_qr_page.dart index 0ee061e..01337a9 100644 --- a/lib/views/animated_qr_page.dart +++ b/lib/views/animated_qr_page.dart @@ -26,22 +26,20 @@ class AnimatedURPage extends AbstractView { @override Widget body(final BuildContext context) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only(top: 64.0, left: 32, right: 32), - child: Observer( + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 32.0), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Observer( builder: (final context) { return URQR( frames: viewModel.urqr, ); }, ), - ), - Padding( - padding: const EdgeInsets.only(left: 32, right: 32, top: 64), - child: Text( + Text( L.animated_qr_note, textAlign: TextAlign.center, style: TextStyle( @@ -50,9 +48,8 @@ class AnimatedURPage extends AbstractView { fontWeight: FontWeight.w400, ), ), - ), - const SizedBox(height: 32), - ], + ], + ), ); } diff --git a/lib/views/new_wallet_info.dart b/lib/views/new_wallet_info.dart index a8be404..17b4ae7 100644 --- a/lib/views/new_wallet_info.dart +++ b/lib/views/new_wallet_info.dart @@ -27,6 +27,7 @@ class NewWalletInfoScreen extends AbstractView { builder: (final context) => AppBar( title: Text(viewModel.screenName), automaticallyImplyLeading: canPop, + backgroundColor: Colors.transparent, actions: _getActionButton(), ), ), @@ -94,7 +95,13 @@ class NewWalletInfoScreen extends AbstractView { builder: (final context) => Column( children: [ if (viewModel.page.svgIcon != null) viewModel.page.svgIcon!, - ...viewModel.page.texts, + Expanded( + child: SingleChildScrollView( + child: Column( + children: viewModel.page.texts, + ), + ), + ), ], ), ), diff --git a/lib/views/onboarding_screen.dart b/lib/views/onboarding_screen.dart index bc8ced6..a30c0b4 100644 --- a/lib/views/onboarding_screen.dart +++ b/lib/views/onboarding_screen.dart @@ -28,10 +28,9 @@ class OnboardingScreen extends AbstractView { return Padding( padding: const EdgeInsets.all(24.0), child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - const SizedBox(height: 60), _getIconForPage(index), - const SizedBox(height: 24), Text( pageData.description, style: T.textTheme.bodyLarge?.copyWith( diff --git a/lib/views/unconfirmed_transaction.dart b/lib/views/unconfirmed_transaction.dart index 038a83f..f6b3cef 100644 --- a/lib/views/unconfirmed_transaction.dart +++ b/lib/views/unconfirmed_transaction.dart @@ -61,71 +61,73 @@ class UnconfirmedTransactionView { color: Color(0xff1B284A), borderRadius: BorderRadius.vertical(top: Radius.circular(20)), ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - width: double.maxFinite, - child: Stack( - alignment: Alignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Padding( - padding: const EdgeInsets.only(right: 16, top: 16), - child: Container( - width: 34, - height: 34, - decoration: BoxDecoration( - color: T.colorScheme.surfaceContainer, - borderRadius: BorderRadius.circular(512), - ), - child: IconButton( - onPressed: () => viewModel.cancel(context), - icon: Icon( - Icons.close, - color: T.colorScheme.onSurface, - size: 18, + child: SafeArea( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: double.maxFinite, + child: Stack( + alignment: Alignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: const EdgeInsets.only(right: 16, top: 16), + child: Container( + width: 34, + height: 34, + decoration: BoxDecoration( + color: T.colorScheme.surfaceContainer, + borderRadius: BorderRadius.circular(512), + ), + child: IconButton( + onPressed: () => viewModel.cancel(context), + icon: Icon( + Icons.close, + color: T.colorScheme.onSurface, + size: 18, + ), ), ), ), + ], + ), + Container( + width: 40, + height: 4, + margin: const EdgeInsets.symmetric(vertical: 12), + decoration: BoxDecoration( + color: Colors.white.withAlpha(76), + borderRadius: BorderRadius.circular(2), ), - ], - ), - Container( - width: 40, - height: 4, - margin: const EdgeInsets.symmetric(vertical: 12), - decoration: BoxDecoration( - color: Colors.white.withAlpha(76), - borderRadius: BorderRadius.circular(2), ), - ), - ], + ], + ), ), - ), - Padding( - padding: const EdgeInsets.only(bottom: 32, top: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - viewModel.wallet.coin.strings.svg.svg(height: 32), - const SizedBox(width: 8), - Text( - L.confirm_transaction, - style: TextStyle( - color: T.colorScheme.onSurface, - fontSize: 22, - fontWeight: FontWeight.w600, + Padding( + padding: const EdgeInsets.only(bottom: 32, top: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + viewModel.wallet.coin.strings.svg.svg(height: 32), + const SizedBox(width: 8), + Text( + L.confirm_transaction, + style: TextStyle( + color: T.colorScheme.onSurface, + fontSize: 22, + fontWeight: FontWeight.w600, + ), ), - ), - ], + ], + ), ), - ), - _buildContent(context), - _buildFooter(context), - ], + _buildContent(context), + _buildFooter(context), + ], + ), ), ); } diff --git a/lib/views/wallet_home.dart b/lib/views/wallet_home.dart index 1dedfa9..6c0abf9 100644 --- a/lib/views/wallet_home.dart +++ b/lib/views/wallet_home.dart @@ -116,31 +116,29 @@ class WalletHome extends AbstractView { AppBar? get appBar => null; Widget _bottomActions(final BuildContext context) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 24), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - _actionButton( - context, - pngAsset: Assets.icons.menuDeposit.image(), - pressedPngAsset: Assets.icons.menuDepositPressed.image(), - onPressed: () => Receive(coinWallet: viewModel.wallet).push(context), - ), - _actionButton( - context, - pngAsset: Assets.icons.menuQr.image(), - pressedPngAsset: Assets.icons.menuQrPressed.image(), - onPressed: () => BarcodeScanner(wallet: viewModel.wallet).push(context), - ), - _actionButton( - context, - pngAsset: Assets.icons.menuMenu.image(), - pressedPngAsset: Assets.icons.menuMenuPressed.image(), - onPressed: () => _showBottomSheet(context), - ), - ], - ), + return Row( + spacing: 6, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + _actionButton( + context, + pngAsset: Assets.icons.menuDeposit.image(), + pressedPngAsset: Assets.icons.menuDepositPressed.image(), + onPressed: () => Receive(coinWallet: viewModel.wallet).push(context), + ), + _actionButton( + context, + pngAsset: Assets.icons.menuQr.image(), + pressedPngAsset: Assets.icons.menuQrPressed.image(), + onPressed: () => BarcodeScanner(wallet: viewModel.wallet).push(context), + ), + _actionButton( + context, + pngAsset: Assets.icons.menuMenu.image(), + pressedPngAsset: Assets.icons.menuMenuPressed.image(), + onPressed: () => _showBottomSheet(context), + ), + ], ); } diff --git a/lib/views/widgets/form_builder.dart b/lib/views/widgets/form_builder.dart index dd4a43c..c08128b 100644 --- a/lib/views/widgets/form_builder.dart +++ b/lib/views/widgets/form_builder.dart @@ -90,79 +90,87 @@ class _FormBuilderState extends State { } } - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox(height: 52), - Text( - count == i && i != 0 - ? L.reenter_your_pin - : count == 0 - ? L.enter_your_pin - : L.create_your_pin, - style: T.textTheme.bodyLarge?.copyWith(fontSize: 20), - ), - if (widget.viewModel.isPinInput) - TextFormField( - focusNode: pinFormTextInputFocusNode, - controller: e.ctrl, - obscureText: e.password, - enableSuggestions: !e.password, - autocorrect: !e.password, - textAlign: TextAlign.center, - decoration: const InputDecoration( - border: InputBorder.none, - ), - onChanged: (final _) { - e.onChanged?.call(); - }, - style: const TextStyle( - fontSize: 16, - ), - ) - else - Padding( - padding: const EdgeInsets.symmetric(vertical: 36.0), - child: BaseTextFormField( - controller: e.ctrl, - obscureText: e.password, - enableSuggestions: !e.password, - autocorrect: !e.password, - ), + return Padding( + padding: EdgeInsets.symmetric(horizontal: 24), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Column( + children: [ + Text( + count == i && i != 0 + ? L.reenter_your_pin + : count == 0 + ? L.enter_your_pin + : L.create_your_pin, + style: T.textTheme.bodyLarge?.copyWith(fontSize: 20), + ), + if (widget.viewModel.isPinInput) + TextFormField( + focusNode: pinFormTextInputFocusNode, + controller: e.ctrl, + obscureText: e.password, + enableSuggestions: !e.password, + autocorrect: !e.password, + textAlign: TextAlign.center, + decoration: const InputDecoration( + border: InputBorder.none, + ), + onChanged: (final _) { + e.onChanged?.call(); + }, + style: const TextStyle( + fontSize: 16, + ), + ) + else + Padding( + padding: const EdgeInsets.symmetric(vertical: 36.0), + child: BaseTextFormField( + controller: e.ctrl, + obscureText: e.password, + enableSuggestions: !e.password, + autocorrect: !e.password, + ), + ), + if (i == 0) + TextButton( + style: TextButton.styleFrom( + backgroundColor: T.colorScheme.surfaceContainer, + foregroundColor: T.colorScheme.onSurfaceVariant, + ), + onPressed: () { + widget.viewModel.isPinInput = !widget.viewModel.isPinInput; + }, + child: + Text(widget.viewModel.isPinInput ? L.switch_to_password : L.switch_to_pin), + ), + ], ), - if (i == 0) - TextButton( - style: TextButton.styleFrom( - backgroundColor: T.colorScheme.surfaceContainer, - foregroundColor: T.colorScheme.onSurfaceVariant, + const SizedBox(height: 32), + if (widget.viewModel.isPinInput) + NumericalKeyboard( + ctrl: e.ctrl, + showConfirm: () => e.isOk, + nextPage: $nextPageCallback, + onConfirmLongPress: null, + showComma: false, ), - onPressed: () { - widget.viewModel.isPinInput = !widget.viewModel.isPinInput; - }, - child: Text(widget.viewModel.isPinInput ? L.switch_to_password : L.switch_to_pin), - ), - const SizedBox(height: 32), - if (widget.viewModel.isPinInput) - NumericalKeyboard( - ctrl: e.ctrl, - showConfirm: () => e.isOk, - nextPage: $nextPageCallback, - onConfirmLongPress: null, - showComma: false, - ), - const Spacer(), - if (!widget.viewModel.isPinInput) - SafeArea( - bottom: true, - top: false, - child: LongPrimaryButton( - onPressed: $nextPageCallback, - padding: EdgeInsets.zero, - text: L.continue_, + // const Spacer(), + if (!widget.viewModel.isPinInput) + SafeArea( + bottom: true, + top: false, + child: LongPrimaryButton( + onPressed: $nextPageCallback, + padding: EdgeInsets.zero, + text: L.continue_, + ), ), - ), - const SizedBox(height: 8), - ], + const SizedBox(height: 8), + ], + ), ); } _onLabelChange(null);