From c5980234cb5582d4884525d70cc33202f15c834d Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Fri, 4 Sep 2020 19:26:04 +0300 Subject: [PATCH] CAKE-33 | applied new design to welcome page; called restore wallet options page from welcome page; changed title of the restore wallet options page --- .../restore/restore_wallet_options_page.dart | 2 +- lib/src/screens/welcome/welcome_page.dart | 36 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/lib/src/screens/restore/restore_wallet_options_page.dart b/lib/src/screens/restore/restore_wallet_options_page.dart index 57bf6642a..750a9c7e0 100644 --- a/lib/src/screens/restore/restore_wallet_options_page.dart +++ b/lib/src/screens/restore/restore_wallet_options_page.dart @@ -15,7 +15,7 @@ class RestoreWalletOptionsPage extends BasePage { final Function(BuildContext context) onRestoreFromKeys; @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 imageKeys = Image.asset('assets/images/restore_keys.png'); diff --git a/lib/src/screens/welcome/welcome_page.dart b/lib/src/screens/welcome/welcome_page.dart index 46a4fb89f..78cd04835 100644 --- a/lib/src/screens/welcome/welcome_page.dart +++ b/lib/src/screens/welcome/welcome_page.dart @@ -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:cake_wallet/palette.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/screens/base_page.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 { static const aspectRatioImage = 1.25; @@ -23,14 +21,13 @@ class WelcomePage extends BasePage { @override Widget body(BuildContext context) { - final _themeChanger = Provider.of(context); - final welcomeImage = _themeChanger.getTheme() == Themes.darkTheme - ? welcomeImageDark : welcomeImageLight; + final welcomeImage = getIt.get().isDarkTheme + ? welcomeImageDark : welcomeImageLight; final newWalletImage = Image.asset('assets/images/new_wallet.png', height: 12, width: 12, - color: Palette.oceanBlue); + color: Theme.of(context).accentTextTheme.headline.decorationColor); final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', height: 12, width: 12, @@ -60,13 +57,14 @@ class WelcomePage extends BasePage { S.of(context).welcome, style: TextStyle( fontSize: 18, - color: Theme.of(context).primaryTextTheme.caption.color, + fontWeight: FontWeight.w500, + color: Theme.of(context).accentTextTheme.display3.color, ), textAlign: TextAlign.center, ), ), Padding( - padding: EdgeInsets.only(top: 10), + padding: EdgeInsets.only(top: 5), child: Text( S.of(context).cake_wallet, style: TextStyle( @@ -78,13 +76,13 @@ class WelcomePage extends BasePage { ), ), Padding( - padding: EdgeInsets.only(top: 14), + padding: EdgeInsets.only(top: 5), child: Text( S.of(context).first_wallet_text, style: TextStyle( fontSize: 16, - fontWeight: FontWeight.w600, - color: Theme.of(context).primaryTextTheme.caption.color, + fontWeight: FontWeight.w500, + color: Theme.of(context).accentTextTheme.display3.color, ), textAlign: TextAlign.center, ), @@ -97,7 +95,8 @@ class WelcomePage extends BasePage { S.of(context).please_make_selection, style: TextStyle( fontSize: 12, - color: Theme.of(context).primaryTextTheme.caption.color, + fontWeight: FontWeight.normal, + color: Theme.of(context).accentTextTheme.display3.color, ), textAlign: TextAlign.center, ), @@ -107,18 +106,17 @@ class WelcomePage extends BasePage { onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome), image: newWalletImage, text: S.of(context).create_new, - color: Colors.white, - textColor: Palette.oceanBlue, - borderColor: Palette.oceanBlue, + color: Theme.of(context).accentTextTheme.subtitle.decorationColor, + textColor: Theme.of(context).accentTextTheme.headline.decorationColor, ), ), Padding( padding: EdgeInsets.only(top: 10), child: PrimaryImageButton( - onPressed: () => Navigator.pushNamed(context, Routes.restoreOptions), + onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptionsFromWelcome), image: restoreWalletImage, 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), ) ],