mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Removed safe area on welcome screen and wallet list screen.
This commit is contained in:
parent
12a7c32826
commit
449155af4a
2 changed files with 32 additions and 26 deletions
|
@ -47,16 +47,13 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final newWalletImage = Image.asset('assets/images/new_wallet.png',
|
final newWalletImage = Image.asset('assets/images/new_wallet.png',
|
||||||
height: 12,
|
height: 12, width: 12, color: Colors.white);
|
||||||
width: 12,
|
|
||||||
color: Colors.white);
|
|
||||||
final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
|
final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
|
||||||
height: 12,
|
height: 12,
|
||||||
width: 12,
|
width: 12,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color);
|
color: Theme.of(context).primaryTextTheme.title.color);
|
||||||
|
|
||||||
return SafeArea(
|
return Container(
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(top: 16),
|
padding: EdgeInsets.only(top: 16),
|
||||||
child: ScrollableWithBottomSection(
|
child: ScrollableWithBottomSection(
|
||||||
contentPadding: EdgeInsets.only(bottom: 20),
|
contentPadding: EdgeInsets.only(bottom: 20),
|
||||||
|
@ -83,18 +80,24 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||||
}
|
}
|
||||||
|
|
||||||
final confirmed = await showPopUp<bool>(
|
final confirmed = await showPopUp<bool>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (dialogContext) {
|
builder: (dialogContext) {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).change_wallet_alert_title,
|
alertTitle: S
|
||||||
alertContent: S.of(context).change_wallet_alert_content(wallet.name),
|
.of(context)
|
||||||
leftButtonText: S.of(context).cancel,
|
.change_wallet_alert_title,
|
||||||
rightButtonText: S.of(context).change,
|
alertContent: S
|
||||||
actionLeftButton: () =>
|
.of(context)
|
||||||
Navigator.of(context).pop(false),
|
.change_wallet_alert_content(
|
||||||
actionRightButton: () =>
|
wallet.name),
|
||||||
Navigator.of(context).pop(true));
|
leftButtonText: S.of(context).cancel,
|
||||||
}) ?? false;
|
rightButtonText: S.of(context).change,
|
||||||
|
actionLeftButton: () =>
|
||||||
|
Navigator.of(context).pop(false),
|
||||||
|
actionRightButton: () =>
|
||||||
|
Navigator.of(context).pop(true));
|
||||||
|
}) ??
|
||||||
|
false;
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
await _loadWallet(wallet);
|
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>[
|
bottomSection: Column(children: <Widget>[
|
||||||
PrimaryImageButton(
|
PrimaryImageButton(
|
||||||
onPressed: () => Navigator.of(context).pushNamed(Routes.newWalletType),
|
onPressed: () =>
|
||||||
|
Navigator.of(context).pushNamed(Routes.newWalletType),
|
||||||
image: newWalletImage,
|
image: newWalletImage,
|
||||||
text: S.of(context).wallet_list_create_new_wallet,
|
text: S.of(context).wallet_list_create_new_wallet,
|
||||||
color: Theme.of(context).accentTextTheme.body2.color,
|
color: Theme.of(context).accentTextTheme.body2.color,
|
||||||
|
@ -179,7 +184,7 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||||
color: Theme.of(context).accentTextTheme.caption.color,
|
color: Theme.of(context).accentTextTheme.caption.color,
|
||||||
textColor: Theme.of(context).primaryTextTheme.title.color)
|
textColor: Theme.of(context).primaryTextTheme.title.color)
|
||||||
])),
|
])),
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Image _imageFor({WalletType type}) {
|
Image _imageFor({WalletType type}) {
|
||||||
|
@ -239,17 +244,17 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||||
Future<void> _generateNewWallet() async {
|
Future<void> _generateNewWallet() async {
|
||||||
try {
|
try {
|
||||||
changeProcessText(S.of(context).creating_new_wallet);
|
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();
|
hideProgressText();
|
||||||
await Navigator.of(context).pushNamed(Routes.preSeed);
|
await Navigator.of(context).pushNamed(Routes.preSeed);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
changeProcessText(S.of(context).creating_new_wallet_error(e.toString()));
|
changeProcessText(S.of(context).creating_new_wallet_error(e.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void changeProcessText(String text) {
|
void changeProcessText(String text) {
|
||||||
_progressBar = createBar<void>(text, duration: null)
|
_progressBar = createBar<void>(text, duration: null)..show(context);
|
||||||
..show(context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void hideProgressText() {
|
void hideProgressText() {
|
||||||
|
|
|
@ -17,7 +17,7 @@ class WelcomePage extends BasePage {
|
||||||
.of(context)
|
.of(context)
|
||||||
.backgroundColor,
|
.backgroundColor,
|
||||||
resizeToAvoidBottomPadding: false,
|
resizeToAvoidBottomPadding: false,
|
||||||
body: SafeArea(child: body(context)));
|
body: body(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -43,8 +43,9 @@ class WelcomePage extends BasePage {
|
||||||
.color);
|
.color);
|
||||||
|
|
||||||
return WillPopScope(onWillPop: () async => false, child: Container(
|
return WillPopScope(onWillPop: () async => false, child: Container(
|
||||||
padding: EdgeInsets.all(24),
|
padding: EdgeInsets.only(top: 64, bottom: 24, left: 24, right: 24),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
|
|
Loading…
Reference in a new issue