mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
Merge pull request #738 from cypherstack/ui
Fix mobile wallet creation UI
This commit is contained in:
commit
3fce0dd687
1 changed files with 55 additions and 66 deletions
|
@ -77,82 +77,71 @@ class _NewWalletRecoveryPhraseWarningViewState
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
debugPrint("BUILD: $runtimeType");
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
|
||||||
return MasterScaffold(
|
|
||||||
isDesktop: isDesktop,
|
|
||||||
appBar: _buildAppBar(context),
|
|
||||||
body: _buildBody(context),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _buildAppBar(BuildContext context) {
|
|
||||||
return isDesktop
|
|
||||||
? const DesktopAppBar(
|
|
||||||
isCompactHeight: false,
|
|
||||||
leading: AppBarBackButton(),
|
|
||||||
trailing: ExitToMyStackButton(),
|
|
||||||
)
|
|
||||||
: AppBar(
|
|
||||||
leading: const AppBarBackButton(),
|
|
||||||
actions: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
top: 10,
|
|
||||||
bottom: 10,
|
|
||||||
right: 10,
|
|
||||||
),
|
|
||||||
child: AppBarIconButton(
|
|
||||||
semanticsLabel:
|
|
||||||
"Question Button. Opens A Dialog For Recovery Phrase Explanation.",
|
|
||||||
icon: SvgPicture.asset(
|
|
||||||
Assets.svg.circleQuestion,
|
|
||||||
width: 20,
|
|
||||||
height: 20,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.extension<StackColors>()!
|
|
||||||
.accentColorDark,
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
await showDialog<void>(
|
|
||||||
context: context,
|
|
||||||
builder: (context) =>
|
|
||||||
const RecoveryPhraseExplanationDialog(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _buildBody(BuildContext context) {
|
|
||||||
final options = ref.read(pNewWalletOptions.state).state;
|
final options = ref.read(pNewWalletOptions.state).state;
|
||||||
|
|
||||||
final seedCount = options?.mnemonicWordsCount ??
|
final seedCount = options?.mnemonicWordsCount ??
|
||||||
Constants.defaultSeedPhraseLengthFor(coin: coin);
|
Constants.defaultSeedPhraseLengthFor(coin: coin);
|
||||||
|
|
||||||
return SingleChildScrollView(
|
return MasterScaffold(
|
||||||
child: Center(
|
isDesktop: isDesktop,
|
||||||
|
appBar: isDesktop
|
||||||
|
? const DesktopAppBar(
|
||||||
|
isCompactHeight: false,
|
||||||
|
leading: AppBarBackButton(),
|
||||||
|
trailing: ExitToMyStackButton(),
|
||||||
|
)
|
||||||
|
: AppBar(
|
||||||
|
leading: const AppBarBackButton(),
|
||||||
|
actions: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 10,
|
||||||
|
bottom: 10,
|
||||||
|
right: 10,
|
||||||
|
),
|
||||||
|
child: AppBarIconButton(
|
||||||
|
semanticsLabel:
|
||||||
|
"Question Button. Opens A Dialog For Recovery Phrase Explanation.",
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
Assets.svg.circleQuestion,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorDark,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
await showDialog<void>(
|
||||||
|
context: context,
|
||||||
|
builder: (context) =>
|
||||||
|
const RecoveryPhraseExplanationDialog(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: SingleChildScrollView(
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(maxWidth: isDesktop ? 480 : double.infinity),
|
BoxConstraints(maxWidth: isDesktop ? 480 : double.infinity),
|
||||||
child: Padding(
|
child: IntrinsicHeight(
|
||||||
padding: const EdgeInsets.all(16),
|
child: Padding(
|
||||||
child: Column(
|
padding: const EdgeInsets.all(16),
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
child: Center(
|
||||||
children: [
|
child: Column(
|
||||||
Column(
|
crossAxisAlignment: isDesktop
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
? CrossAxisAlignment.center
|
||||||
|
: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
if (isDesktop)
|
/*if (isDesktop)
|
||||||
// TODO vertical centering/alignment.
|
const Spacer(
|
||||||
/*const Spacer(
|
|
||||||
flex: 10,
|
flex: 10,
|
||||||
),*/
|
),*/
|
||||||
if (!isDesktop)
|
if (!isDesktop)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 4,
|
height: 4,
|
||||||
),
|
),
|
||||||
if (!isDesktop)
|
if (!isDesktop)
|
||||||
Text(
|
Text(
|
||||||
walletName,
|
walletName,
|
||||||
|
@ -694,7 +683,7 @@ class _NewWalletRecoveryPhraseWarningViewState
|
||||||
),*/
|
),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue