Removed safe area on welcome screen and wallet list screen.

This commit is contained in:
M 2021-02-09 19:57:58 +02:00
parent 12a7c32826
commit 449155af4a
2 changed files with 32 additions and 26 deletions

View file

@ -47,16 +47,13 @@ class WalletListBodyState extends State<WalletListBody> {
@override
Widget build(BuildContext context) {
final newWalletImage = Image.asset('assets/images/new_wallet.png',
height: 12,
width: 12,
color: Colors.white);
height: 12, width: 12, color: Colors.white);
final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
height: 12,
width: 12,
color: Theme.of(context).primaryTextTheme.title.color);
return SafeArea(
child: Container(
return Container(
padding: EdgeInsets.only(top: 16),
child: ScrollableWithBottomSection(
contentPadding: EdgeInsets.only(bottom: 20),
@ -83,18 +80,24 @@ class WalletListBodyState extends State<WalletListBody> {
}
final confirmed = await showPopUp<bool>(
context: context,
builder: (dialogContext) {
return AlertWithTwoActions(
alertTitle: S.of(context).change_wallet_alert_title,
alertContent: S.of(context).change_wallet_alert_content(wallet.name),
leftButtonText: S.of(context).cancel,
rightButtonText: S.of(context).change,
actionLeftButton: () =>
Navigator.of(context).pop(false),
actionRightButton: () =>
Navigator.of(context).pop(true));
}) ?? false;
context: context,
builder: (dialogContext) {
return AlertWithTwoActions(
alertTitle: S
.of(context)
.change_wallet_alert_title,
alertContent: S
.of(context)
.change_wallet_alert_content(
wallet.name),
leftButtonText: S.of(context).cancel,
rightButtonText: S.of(context).change,
actionLeftButton: () =>
Navigator.of(context).pop(false),
actionRightButton: () =>
Navigator.of(context).pop(true));
}) ??
false;
if (confirmed) {
await _loadWallet(wallet);
@ -161,10 +164,12 @@ class WalletListBodyState extends State<WalletListBody> {
}),
),
),
bottomSectionPadding: EdgeInsets.only(bottom: 24, right: 24, left: 24),
bottomSectionPadding:
EdgeInsets.only(bottom: 24, right: 24, left: 24),
bottomSection: Column(children: <Widget>[
PrimaryImageButton(
onPressed: () => Navigator.of(context).pushNamed(Routes.newWalletType),
onPressed: () =>
Navigator.of(context).pushNamed(Routes.newWalletType),
image: newWalletImage,
text: S.of(context).wallet_list_create_new_wallet,
color: Theme.of(context).accentTextTheme.body2.color,
@ -179,7 +184,7 @@ class WalletListBodyState extends State<WalletListBody> {
color: Theme.of(context).accentTextTheme.caption.color,
textColor: Theme.of(context).primaryTextTheme.title.color)
])),
));
);
}
Image _imageFor({WalletType type}) {
@ -239,17 +244,17 @@ class WalletListBodyState extends State<WalletListBody> {
Future<void> _generateNewWallet() async {
try {
changeProcessText(S.of(context).creating_new_wallet);
await widget.walletListViewModel.walletNewVM.create(options: 'English'); // FIXME: Unnamed constant
await widget.walletListViewModel.walletNewVM
.create(options: 'English'); // FIXME: Unnamed constant
hideProgressText();
await Navigator.of(context).pushNamed(Routes.preSeed);
} catch(e) {
} catch (e) {
changeProcessText(S.of(context).creating_new_wallet_error(e.toString()));
}
}
void changeProcessText(String text) {
_progressBar = createBar<void>(text, duration: null)
..show(context);
_progressBar = createBar<void>(text, duration: null)..show(context);
}
void hideProgressText() {

View file

@ -17,7 +17,7 @@ class WelcomePage extends BasePage {
.of(context)
.backgroundColor,
resizeToAvoidBottomPadding: false,
body: SafeArea(child: body(context)));
body: body(context));
}
@override
@ -43,8 +43,9 @@ class WelcomePage extends BasePage {
.color);
return WillPopScope(onWillPop: () async => false, child: Container(
padding: EdgeInsets.all(24),
padding: EdgeInsets.only(top: 64, bottom: 24, left: 24, right: 24),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Flexible(
flex: 2,