mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 17:57:36 +00:00
Merge pull request #98 from cake-tech/CAKE-33-update-welcome-screen
CAKE-33 | applied new design to welcome page; called restore wallet o…
This commit is contained in:
commit
c6e7d8842d
2 changed files with 18 additions and 20 deletions
|
@ -15,7 +15,7 @@ class RestoreWalletOptionsPage extends BasePage {
|
||||||
final Function(BuildContext context) onRestoreFromKeys;
|
final Function(BuildContext context) onRestoreFromKeys;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get title => S.current.restore_seed_keys_restore;
|
String get title => S.current.restore_restore_wallet;
|
||||||
|
|
||||||
final imageSeed = Image.asset('assets/images/restore_seed.png');
|
final imageSeed = Image.asset('assets/images/restore_seed.png');
|
||||||
final imageKeys = Image.asset('assets/images/restore_keys.png');
|
final imageKeys = Image.asset('assets/images/restore_keys.png');
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
|
import 'package:cake_wallet/di.dart';
|
||||||
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cake_wallet/palette.dart';
|
|
||||||
import 'package:cake_wallet/routes.dart';
|
import 'package:cake_wallet/routes.dart';
|
||||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
import 'package:cake_wallet/themes.dart';
|
|
||||||
import 'package:cake_wallet/theme_changer.dart';
|
|
||||||
|
|
||||||
class WelcomePage extends BasePage {
|
class WelcomePage extends BasePage {
|
||||||
static const aspectRatioImage = 1.25;
|
static const aspectRatioImage = 1.25;
|
||||||
|
@ -23,14 +21,13 @@ class WelcomePage extends BasePage {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) {
|
Widget body(BuildContext context) {
|
||||||
final _themeChanger = Provider.of<ThemeChanger>(context);
|
final welcomeImage = getIt.get<SettingsStore>().isDarkTheme
|
||||||
final welcomeImage = _themeChanger.getTheme() == Themes.darkTheme
|
? welcomeImageDark : welcomeImageLight;
|
||||||
? welcomeImageDark : welcomeImageLight;
|
|
||||||
|
|
||||||
final newWalletImage = Image.asset('assets/images/new_wallet.png',
|
final newWalletImage = Image.asset('assets/images/new_wallet.png',
|
||||||
height: 12,
|
height: 12,
|
||||||
width: 12,
|
width: 12,
|
||||||
color: Palette.oceanBlue);
|
color: Theme.of(context).accentTextTheme.headline.decorationColor);
|
||||||
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,
|
||||||
|
@ -60,13 +57,14 @@ class WelcomePage extends BasePage {
|
||||||
S.of(context).welcome,
|
S.of(context).welcome,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Theme.of(context).accentTextTheme.display3.color,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 10),
|
padding: EdgeInsets.only(top: 5),
|
||||||
child: Text(
|
child: Text(
|
||||||
S.of(context).cake_wallet,
|
S.of(context).cake_wallet,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -78,13 +76,13 @@ class WelcomePage extends BasePage {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 14),
|
padding: EdgeInsets.only(top: 5),
|
||||||
child: Text(
|
child: Text(
|
||||||
S.of(context).first_wallet_text,
|
S.of(context).first_wallet_text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
color: Theme.of(context).accentTextTheme.display3.color,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
@ -97,7 +95,8 @@ class WelcomePage extends BasePage {
|
||||||
S.of(context).please_make_selection,
|
S.of(context).please_make_selection,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
fontWeight: FontWeight.normal,
|
||||||
|
color: Theme.of(context).accentTextTheme.display3.color,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
@ -107,18 +106,17 @@ class WelcomePage extends BasePage {
|
||||||
onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome),
|
onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome),
|
||||||
image: newWalletImage,
|
image: newWalletImage,
|
||||||
text: S.of(context).create_new,
|
text: S.of(context).create_new,
|
||||||
color: Colors.white,
|
color: Theme.of(context).accentTextTheme.subtitle.decorationColor,
|
||||||
textColor: Palette.oceanBlue,
|
textColor: Theme.of(context).accentTextTheme.headline.decorationColor,
|
||||||
borderColor: Palette.oceanBlue,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 10),
|
padding: EdgeInsets.only(top: 10),
|
||||||
child: PrimaryImageButton(
|
child: PrimaryImageButton(
|
||||||
onPressed: () => Navigator.pushNamed(context, Routes.restoreOptions),
|
onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptionsFromWelcome),
|
||||||
image: restoreWalletImage,
|
image: restoreWalletImage,
|
||||||
text: S.of(context).restore_wallet,
|
text: S.of(context).restore_wallet,
|
||||||
color: Theme.of(context).primaryTextTheme.overline.color,
|
color: Theme.of(context).accentTextTheme.caption.color,
|
||||||
textColor: Theme.of(context).primaryTextTheme.title.color),
|
textColor: Theme.of(context).primaryTextTheme.title.color),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue