mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
refactor app bar
This commit is contained in:
parent
0f8d3eb122
commit
ec9cec5d21
1 changed files with 41 additions and 37 deletions
|
@ -85,43 +85,7 @@ class _NewWalletRecoveryPhraseWarningViewState
|
||||||
|
|
||||||
return MasterScaffold(
|
return MasterScaffold(
|
||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
appBar: isDesktop
|
appBar: _buildAppBar(context),
|
||||||
? 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: ConditionalParent(
|
body: ConditionalParent(
|
||||||
condition: !isDesktop,
|
condition: !isDesktop,
|
||||||
builder: (child) => LayoutBuilder(
|
builder: (child) => LayoutBuilder(
|
||||||
|
@ -653,4 +617,44 @@ class _NewWalletRecoveryPhraseWarningViewState
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue