mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
CWA-221 | reworked seed_language_page as adaptive page; added crypto_lock_light; decreased font size of wallet address on the wallet card
This commit is contained in:
parent
a5551f0de3
commit
e23f471df4
5 changed files with 71 additions and 54 deletions
BIN
assets/images/2.0x/crypto_lock_light.png
Normal file
BIN
assets/images/2.0x/crypto_lock_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
BIN
assets/images/3.0x/crypto_lock_light.png
Normal file
BIN
assets/images/3.0x/crypto_lock_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 191 KiB |
BIN
assets/images/crypto_lock_light.png
Normal file
BIN
assets/images/crypto_lock_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
|
@ -374,7 +374,6 @@ class WalletCardState extends State<WalletCard> {
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 90,
|
height: 90,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
|
@ -396,18 +395,21 @@ class WalletCardState extends State<WalletCard> {
|
||||||
try {
|
try {
|
||||||
_addressObserverKey.currentState.setState(() {
|
_addressObserverKey.currentState.setState(() {
|
||||||
messageBoxHeight = 0;
|
messageBoxHeight = 0;
|
||||||
messageBoxWidth = cardWidth - 10;
|
messageBoxWidth = cardWidth;
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
print('${e.toString()}');
|
print('${e.toString()}');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Padding(
|
||||||
walletStore.subaddress.address,
|
padding: EdgeInsets.only(top: 5),
|
||||||
style: TextStyle(
|
child: Text(
|
||||||
fontSize: 14,
|
walletStore.subaddress.address,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color
|
color: Theme.of(context).primaryTextTheme.title.color
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,10 +5,11 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
|
||||||
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
|
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
|
||||||
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
|
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
|
||||||
import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
|
import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
|
||||||
|
import 'package:cake_wallet/themes.dart';
|
||||||
|
import 'package:cake_wallet/theme_changer.dart';
|
||||||
|
|
||||||
class SeedLanguage extends BasePage {
|
class SeedLanguage extends BasePage {
|
||||||
@override
|
@override
|
||||||
|
@ -22,11 +23,15 @@ class SeedLanguageForm extends StatefulWidget {
|
||||||
|
|
||||||
class SeedLanguageFormState extends State<SeedLanguageForm> {
|
class SeedLanguageFormState extends State<SeedLanguageForm> {
|
||||||
static const aspectRatioImage = 1.22;
|
static const aspectRatioImage = 1.22;
|
||||||
final walletNameImage = Image.asset('assets/images/wallet_name.png');
|
final walletNameImageLight = Image.asset('assets/images/wallet_name_light.png');
|
||||||
|
final walletNameImageDark = Image.asset('assets/images/wallet_name.png');
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final seedLanguageStore = Provider.of<SeedLanguageStore>(context);
|
final seedLanguageStore = Provider.of<SeedLanguageStore>(context);
|
||||||
|
final _themeChanger = Provider.of<ThemeChanger>(context);
|
||||||
|
final walletNameImage = _themeChanger.getTheme() == Themes.darkTheme
|
||||||
|
? walletNameImageDark : walletNameImageLight;
|
||||||
|
|
||||||
final List<String> seedLocales = [
|
final List<String> seedLocales = [
|
||||||
S.current.seed_language_english,
|
S.current.seed_language_english,
|
||||||
|
@ -40,55 +45,65 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
|
||||||
];
|
];
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.all(24),
|
||||||
child: ScrollableWithBottomSection(
|
child: Column(
|
||||||
contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
children: <Widget>[
|
||||||
content: Column(
|
Flexible(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
flex: 2,
|
||||||
children: [
|
child: AspectRatio(
|
||||||
Padding(
|
aspectRatio: aspectRatioImage,
|
||||||
padding: EdgeInsets.only(left: 12, right: 12),
|
child: FittedBox(child: walletNameImage, fit: BoxFit.fill)
|
||||||
child: AspectRatio(
|
)
|
||||||
aspectRatio: aspectRatioImage,
|
),
|
||||||
child: FittedBox(child: walletNameImage, fit: BoxFit.fill)),
|
Flexible(
|
||||||
),
|
flex: 3,
|
||||||
Padding(padding: EdgeInsets.only(top: 40),
|
child: Column(
|
||||||
child: Text(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
S.of(context).seed_language_choose,
|
children: <Widget>[
|
||||||
textAlign: TextAlign.center,
|
Column(
|
||||||
style: TextStyle(
|
children: <Widget>[
|
||||||
fontSize: 16.0,
|
Padding(padding: EdgeInsets.only(top: 48),
|
||||||
fontWeight: FontWeight.w600,
|
child: Text(
|
||||||
color: Theme.of(context).primaryTextTheme.title.color
|
S.of(context).seed_language_choose,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Theme.of(context).primaryTextTheme.title.color
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(padding: EdgeInsets.only(top: 24),
|
||||||
),
|
child: Observer(
|
||||||
Padding(padding: EdgeInsets.only(top: 24),
|
builder: (_) => SelectButton(
|
||||||
child: Observer(
|
image: null,
|
||||||
builder: (_) => SelectButton(
|
text: seedLocales[seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage)],
|
||||||
image: null,
|
color: Theme.of(context).accentTextTheme.title.backgroundColor,
|
||||||
text: seedLocales[seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage)],
|
textColor: Theme.of(context).primaryTextTheme.title.color,
|
||||||
color: Theme.of(context).accentTextTheme.title.backgroundColor,
|
onTap: () async => await showDialog(
|
||||||
textColor: Theme.of(context).primaryTextTheme.title.color,
|
context: context,
|
||||||
onTap: () async => await showDialog(
|
builder: (BuildContext context) => SeedLanguagePicker()
|
||||||
context: context,
|
)
|
||||||
builder: (BuildContext context) => SeedLanguagePicker()
|
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
),
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Observer(
|
||||||
|
builder: (context) {
|
||||||
|
return PrimaryButton(
|
||||||
|
onPressed: () =>
|
||||||
|
Navigator.of(context).popAndPushNamed(seedLanguageStore.currentRoute),
|
||||||
|
text: S.of(context).seed_language_next,
|
||||||
|
color: Colors.green,
|
||||||
|
textColor: Colors.white);
|
||||||
|
},
|
||||||
)
|
)
|
||||||
]),
|
],
|
||||||
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
)
|
||||||
bottomSection: Observer(
|
)
|
||||||
builder: (context) {
|
],
|
||||||
return PrimaryButton(
|
)
|
||||||
onPressed: () =>
|
|
||||||
Navigator.of(context).popAndPushNamed(seedLanguageStore.currentRoute),
|
|
||||||
text: S.of(context).seed_language_next,
|
|
||||||
color: Colors.green,
|
|
||||||
textColor: Colors.white);
|
|
||||||
},
|
|
||||||
)),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue