Merge pull request #738 from cypherstack/ui

Fix mobile wallet creation UI
This commit is contained in:
Diego Salazar 2024-01-29 15:44:45 -07:00 committed by GitHub
commit 3fce0dd687
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,16 +77,14 @@ class _NewWalletRecoveryPhraseWarningViewState
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
final options = ref.read(pNewWalletOptions.state).state;
final seedCount = options?.mnemonicWordsCount ??
Constants.defaultSeedPhraseLengthFor(coin: coin);
return MasterScaffold(
isDesktop: isDesktop,
appBar: _buildAppBar(context),
body: _buildBody(context),
);
}
Widget _buildAppBar(BuildContext context) {
return isDesktop
appBar: isDesktop
? const DesktopAppBar(
isCompactHeight: false,
leading: AppBarBackButton(),
@ -122,31 +120,22 @@ class _NewWalletRecoveryPhraseWarningViewState
),
)
],
);
}
Widget _buildBody(BuildContext context) {
final options = ref.read(pNewWalletOptions.state).state;
final seedCount = options?.mnemonicWordsCount ??
Constants.defaultSeedPhraseLengthFor(coin: coin);
return SingleChildScrollView(
child: Center(
),
body: SingleChildScrollView(
child: ConstrainedBox(
constraints:
BoxConstraints(maxWidth: isDesktop ? 480 : double.infinity),
child: IntrinsicHeight(
child: Padding(
padding: const EdgeInsets.all(16),
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
crossAxisAlignment: isDesktop
? CrossAxisAlignment.center
: CrossAxisAlignment.stretch,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (isDesktop)
// TODO vertical centering/alignment.
/*const Spacer(
/*if (isDesktop)
const Spacer(
flex: 10,
),*/
if (!isDesktop)
@ -694,7 +683,7 @@ class _NewWalletRecoveryPhraseWarningViewState
),*/
],
),
],
),
),
),
),