CWA-217 | applied light mode to the application; deleted copy button, enter_pin_code.dart, present picker and standard close button; applied new design to rescan page

Oleksandr Sobol committed May 29, 2020 at 18:10 UTC ce21e6bc7a922f1c2e670e89d63f7355bfd78fcd
82 files changed +1303 -1728
assets/images/2.0x/filter_light_button.png
Binary files /dev/null and b/assets/images/2.0x/filter_light_button.png differ
assets/images/3.0x/filter_light_button.png
Binary files /dev/null and b/assets/images/3.0x/filter_light_button.png differ
assets/images/filter_light_button.png
Binary files /dev/null and b/assets/images/filter_light_button.png differ
lib/palette.dart
+21 -84
@@ -1,93 +1,30 @@
1 import 'package:flutter/material.dart';
2
3 class Palette {
4 - static const Color lightBlue = Color.fromRGBO(126, 147, 177, 1.0);
5 - static const Color lightBlueWithOpacity = Color.fromRGBO(126, 147, 177, 0.4);
6 - static const Color lightGrey = Color.fromRGBO(224, 233, 246, 1.0);
7 - static const Color purple = Color.fromRGBO(243, 229, 245, 1.0);
8 - static const Color deepPink = Color.fromRGBO(225, 190, 231, 1.0);
9 - static const Color indigo = Color.fromRGBO(232, 234, 246, 1.0);
10 - static const Color deepIndigo = Color.fromRGBO(197, 202, 233, 1.0);
11 - static const Color creamyGrey = Color.fromRGBO(245, 246, 249, 1.0);
12 - static const Color deepPurple = Color.fromRGBO(124, 83, 240, 1.0);
13 - static const Color wildDarkBlue = Color.fromRGBO(155, 172, 197, 1.0);
14 - static const Color wildDarkBlueWithOpacity = Color.fromRGBO(155, 172, 197, 0.1);
15 - static const Color lightGreen = Color.fromRGBO(52, 186, 204, 1.0);
16 - static const Color darkPurple = Color.fromRGBO(124, 83, 240, 1.0);
17 - static const Color brightBlue = Color.fromRGBO(151, 226, 255, 0.6);
18 - static const Color cloudySky = Color.fromRGBO(121, 201, 233, 0.8);
19 - static const Color darkGrey = Color.fromRGBO(136, 155, 183, 0.21);
20 - static const Color shadowGrey = Color.fromRGBO(132, 141, 198, 0.14);
21 - static const Color shadowGreyWithOpacity = Color.fromRGBO(132, 141, 198, 0.05);
22 - static const Color blueGrey = Color.fromRGBO(103, 107, 141, 1.0);
23 - static const Color lightGrey2 = Color.fromRGBO(249, 249, 249, 1.0);
24 - static const Color violet = Color.fromRGBO(138, 80, 255, 1.0);
25 - static const Color lightViolet = Color.fromRGBO(131, 87, 255, 1);
26 - static const Color cakeGreen = Color.fromRGBO(41, 187, 244, 1.0);
27 - static const Color cakeGreenWithOpacity = Color.fromRGBO(41, 187, 244, 0.2);
28 - static const Color switchBackground = Color.fromRGBO(228, 231, 240, 1.0);
29 - static const Color switchBorder = Color.fromRGBO(211, 222, 238, 1.0);
4 static const Color green = Color.fromRGBO(39, 206, 80, 1.0);
5 static const Color red = Color.fromRGBO(255, 51, 51, 1.0);
32 - static const Color nightBlue = Color.fromRGBO(34, 40, 75, 1.0);
33 - static const Color lavender = Color.fromRGBO(249, 250, 253, 1);
34 - static const Color lightLavender = Color.fromRGBO(242, 244, 247, 1);
35 - static const Color cadetBlue = Color.fromRGBO(191, 201, 215, 1);
36 - static const Color manatee = Color.fromRGBO(138, 153, 175, 1);
37 - static const Color separator = Color.fromRGBO(240, 241, 244, 1);
38 - static const Color containerLavender = Color.fromRGBO(226, 235, 238, 0.4);
39 - static const Color purpleBlue = Color.fromRGBO(84, 92, 139, 1);
40 - static const Color floatingActionButton = Color.fromRGBO(213, 56, 99, 1);
41 - static const Color failure = Color.fromRGBO(226, 35, 35, 1);
42 - static const Color powered = Color.fromRGBO(191, 201, 215, 1);
43 - static const Color buttonShadow = Color.fromRGBO(23, 46, 77, 0.129207);
6 + static const Color blueAlice = Color.fromRGBO(231, 240, 253, 1.0);
7 + static const Color lightBlue = Color.fromRGBO(172, 203, 238, 1.0);
8 + static const Color lavender = Color.fromRGBO(237, 245, 252, 1.0);
9 + static const Color oceanBlue = Color.fromRGBO(30, 52, 78, 1.0);
10 + static const Color lightBlueGrey = Color.fromRGBO(118, 131, 169, 1.0);
11 + static const Color periwinkle = Color.fromRGBO(197, 208, 230, 1.0);
12 + static const Color blue = Color.fromRGBO(88, 143, 252, 1.0);
13 + static const Color darkLavender = Color.fromRGBO(225, 238, 250, 1.0);
14 + static const Color nightBlue = Color.fromRGBO(46, 57, 96, 1.0);
15 }
16
17 class PaletteDark {
47 - static const Color darkThemeTitle = Color.fromRGBO(132, 154, 186, 1.0);
48 - static const Color darkThemeTitleViolet = Color.fromRGBO(121, 92, 190, 1.0);
49 - static const Color darkThemeGrey = Color.fromRGBO(100, 115, 137, 1.0);
50 - static const Color darkThemeGreyWithOpacity = Color.fromRGBO(100, 115, 137, 0.5);
51 - static const Color darkThemeMidGrey = Color.fromRGBO(20, 26, 38, 1.0);
52 - static const Color darkThemePurpleButton = Color.fromRGBO(182, 143, 255, 0.1);
53 - static const Color darkThemePurpleButtonBorder = Color.fromRGBO(161, 120, 255, 0.7);
54 - static const Color darkThemeBackground = Color.fromRGBO(39, 41, 50, 1.0);
55 - static const Color darkThemeBackgroundDark = Color.fromRGBO(9, 12, 18, 1.0);
56 - static const Color darkThemeDarkGrey = Color.fromRGBO(218, 228, 243, 0.06);
57 - static const Color darkGrey = Color.fromRGBO(218, 228, 243, 0.4);
58 - static const Color darkThemeBlackWithOpacity = Color.fromRGBO(0, 0, 0, 0.2);
59 - static const Color darkThemeBlack = Color.fromRGBO(7, 10, 14, 1.0);
60 - static const Color darkThemeAppBarBlack = Color.fromRGBO(4, 5, 7, 1.0);
61 - static const Color darkThemeViolet = Color.fromRGBO(131, 87, 255, 0.2);
62 - static const Color darkThemeIndigoButton = Color.fromRGBO(216, 223, 246, 0.1);
63 - static const Color darkThemeIndigoButtonBorder = Color.fromRGBO(196, 206, 237, 0.4);
64 - static const Color darkThemeBlueButton = Color.fromRGBO(151, 226, 255, 0.1);
65 - static const Color darkThemeBlueButtonBorder = Color.fromRGBO(62, 190, 240, 0.6);
66 - static const Color darkThemeCloseButton = Color.fromRGBO(34, 40, 74, 1.0);
67 - static const Color darkThemePinButton = Color.fromRGBO(136, 155, 183, 0.1);
68 - static const Color darkThemePinDigitButton = Color.fromRGBO(100, 115, 137, 0.34);
69 - static const Color switchBackground = Color.fromRGBO(100, 115, 137, 0.4);
70 - static const Color wildDarkBlueWithOpacity = Color.fromRGBO(155, 172, 197, 0.4);
71 - static const Color wildDarkBlue = Color.fromRGBO(155, 172, 197, 0.8);
72 -
73 - // NEW
74 -
75 - static const Color backgroundStart = Color.fromRGBO(231, 240, 253, 1.0);
76 - static const Color backgroundEnd = Color.fromRGBO(172, 203, 238, 1.0);
77 - static const Color mainBackgroundColor = Color.fromRGBO(70, 85, 133, 1.0);
78 - static const Color borderCardColor = Color.fromRGBO(81, 96, 147, 1.0);
79 - static const Color walletCardTopStartSync = Color.fromRGBO(89, 104, 152, 1.0);
80 - static const Color walletCardBottomStartSync = Color.fromRGBO(70, 85, 133, 1.0);
81 - static const Color walletCardTopEndSync = Color.fromRGBO(70, 85, 133, 1.0);
82 - static const Color walletCardBottomEndSync = Color.fromRGBO(45, 56, 95, 1.0);
83 - static const Color walletCardText = Color.fromRGBO(140, 153, 201, 1.0);
84 - static const Color walletCardAddressField = Color.fromRGBO(51, 63, 104, 1.0);
85 - static const Color walletCardAddressText = Color.fromRGBO(183, 197, 242, 1.0);
86 - static const Color walletCardSubAddressField = Color.fromRGBO(63, 77, 122, 1.0);
87 - static const Color historyPanel = Color.fromRGBO(33, 43, 73, 1.0);
88 - static const Color historyPanelText = Color.fromRGBO(91, 112, 146, 1.0);
89 - static const Color historyPanelButton = Color.fromRGBO(39, 53, 96, 1.0);
90 - static const Color menuHeader = Color.fromRGBO(41, 52, 84, 1.0);
91 - static const Color menuList = Color.fromRGBO(48, 59, 95, 1.0);
92 - static const Color selectButtonText = Color.fromRGBO(57, 74, 95, 1.0);
18 + static const Color distantBlue = Color.fromRGBO(70, 85, 133, 1.0); // mainBackgroundColor
19 + static const Color lightDistantBlue = Color.fromRGBO(81, 96, 147, 1.0); // borderCardColor
20 + static const Color nightBlue = Color.fromRGBO(45, 56, 95, 1.0); // walletCardBottomEndSync
21 + static const Color gray = Color.fromRGBO(140, 153, 201, 1.0); // walletCardText
22 + static const Color violetBlue = Color.fromRGBO(51, 63, 104, 1.0); // walletCardAddressField
23 + static const Color moderateBlue = Color.fromRGBO(63, 77, 122, 1.0); // walletCardSubAddressField
24 + static const Color darkNightBlue = Color.fromRGBO(33, 43, 73, 1.0); // historyPanel
25 + static const Color pigeonBlue = Color.fromRGBO(91, 112, 146, 1.0); // historyPanelText
26 + static const Color moderateNightBlue = Color.fromRGBO(39, 53, 96, 1.0); // historyPanelButton
27 + static const Color headerNightBlue = Color.fromRGBO(41, 52, 84, 1.0); // menuHeader
28 + static const Color lightNightBlue = Color.fromRGBO(48, 59, 95, 1.0); // menuList
29 + static const Color moderatePurpleBlue = Color.fromRGBO(57, 74, 95, 1.0); // selectButtonText
30 }
\ No newline at end of file
lib/src/screens/accounts/account_list_page.dart
+5 -5
@@ -35,7 +35,7 @@ class AccountListPageForm extends State<AccountListPage> {
35 child: BackdropFilter(
36 filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
37 child: Container(
38 - decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
38 + decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)),
39 child: Center(
40 child: Column(
41 mainAxisSize: MainAxisSize.min,
@@ -61,7 +61,7 @@ class AccountListPageForm extends State<AccountListPage> {
61 borderRadius: BorderRadius.all(Radius.circular(14)),
62 child: Container(
63 height: 296,
64 - color: PaletteDark.menuList,
64 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
65 child: Column(
66 children: <Widget>[
67 Expanded(
@@ -71,7 +71,7 @@ class AccountListPageForm extends State<AccountListPage> {
71
72 return ListView.separated(
73 separatorBuilder: (context, index) => Divider(
74 - color: PaletteDark.mainBackgroundColor,
74 + color: Theme.of(context).dividerColor,
75 height: 1,
76 ),
77 itemCount: accounts == null ? 0 : accounts.length,
@@ -117,7 +117,7 @@ class AccountListPageForm extends State<AccountListPage> {
117 children: <Widget>[
118 Icon(
119 Icons.add,
120 - color: PaletteDark.historyPanel,
120 + color: PaletteDark.darkNightBlue,
121 ),
122 Padding(
123 padding: EdgeInsets.only(left: 5),
@@ -126,7 +126,7 @@ class AccountListPageForm extends State<AccountListPage> {
126 style: TextStyle(
127 fontSize: 15,
128 fontWeight: FontWeight.w600,
129 - color: PaletteDark.historyPanel,
129 + color: PaletteDark.darkNightBlue,
130 decoration: TextDecoration.none,
131 ),
132 ),
lib/src/screens/accounts/account_page.dart
+1 -4
@@ -18,9 +18,6 @@ class AccountPage extends BasePage {
18 @override
19 String get title => S.current.account;
20
21 - @override
22 - Color get backgroundColor => PaletteDark.historyPanel;
23 -
21 @override
22 Widget body(BuildContext context) => AccountForm(account);
23 }
@@ -65,7 +62,7 @@ class AccountFormState extends State<AccountForm> {
62 return Form(
63 key: _formKey,
64 child: Container(
68 - color: PaletteDark.historyPanel,
65 + color: Theme.of(context).backgroundColor,
66 padding: EdgeInsets.all(24.0),
67 child: Column(
68 children: <Widget>[
lib/src/screens/accounts/widgets/account_tile.dart
+2 -3
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2
3 class AccountTile extends StatelessWidget {
4 AccountTile({
@@ -14,8 +13,8 @@ class AccountTile extends StatelessWidget {
13
14 @override
15 Widget build(BuildContext context) {
17 - final color = isCurrent ? PaletteDark.menuHeader : Colors.transparent;
18 - final textColor = isCurrent ? Colors.blue : Colors.white;
16 + final color = isCurrent ? Theme.of(context).accentTextTheme.subtitle.decorationColor : Colors.transparent;
17 + final textColor = isCurrent ? Colors.blue : Theme.of(context).primaryTextTheme.title.color;
18
19 return GestureDetector(
20 onTap: onTap,
lib/src/screens/address_book/address_book_page.dart
+13 -13
@@ -5,7 +5,6 @@ import 'package:flutter/services.dart';
5 import 'package:flutter_mobx/flutter_mobx.dart';
6 import 'package:flutter_slidable/flutter_slidable.dart';
7 import 'package:cake_wallet/routes.dart';
8 -import 'package:cake_wallet/palette.dart';
8 import 'package:cake_wallet/generated/i18n.dart';
9 import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
10 import 'package:cake_wallet/src/stores/address_book/address_book_store.dart';
@@ -17,9 +16,6 @@ class AddressBookPage extends BasePage {
16
17 final bool isEditable;
18
20 - @override
21 - Color get backgroundColor => PaletteDark.historyPanel;
22 -
19 @override
20 String get title => S.current.address_book;
21
@@ -35,11 +31,15 @@ class AddressBookPage extends BasePage {
31 width: 32.0,
32 height: 32.0,
33 decoration: BoxDecoration(
38 - shape: BoxShape.circle, color: PaletteDark.menuList),
34 + shape: BoxShape.circle,
35 + color: Theme.of(context).accentTextTheme.title.backgroundColor
36 + ),
37 child: Stack(
38 alignment: Alignment.center,
39 children: <Widget>[
42 - Icon(Icons.add, color: Colors.white, size: 22.0),
40 + Icon(Icons.add,
41 + color: Theme.of(context).primaryTextTheme.title.color,
42 + size: 22.0),
43 ButtonTheme(
44 minWidth: 32.0,
45 height: 32.0,
@@ -61,17 +61,17 @@ class AddressBookPage extends BasePage {
61 final addressBookStore = Provider.of<AddressBookStore>(context);
62
63 return Container(
64 - color: PaletteDark.historyPanel,
64 + color: Theme.of(context).backgroundColor,
65 padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
66 child: Observer(
67 builder: (_) => ListView.separated(
68 separatorBuilder: (_, __) => Container(
69 height: 1,
70 padding: EdgeInsets.only(left: 24),
71 - color: PaletteDark.menuList,
71 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
72 child: Container(
73 height: 1,
74 - color: PaletteDark.mainBackgroundColor,
74 + color: Theme.of(context).dividerColor,
75 ),
76 ),
77 itemCount: addressBookStore.contactList == null
@@ -117,12 +117,12 @@ class AddressBookPage extends BasePage {
117 ? Container(
118 width: double.infinity,
119 height: 1,
120 - color: PaletteDark.mainBackgroundColor,
120 + color: Theme.of(context).dividerColor,
121 )
122 : Offstage(),
123 Container(
124 width: double.infinity,
125 - color: PaletteDark.menuList,
125 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
126 child: Padding(
127 padding: const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
128 child: Row(
@@ -141,7 +141,7 @@ class AddressBookPage extends BasePage {
141 contact.name,
142 style: TextStyle(
143 fontSize: 14,
144 - color: Colors.white
144 + color: Theme.of(context).primaryTextTheme.title.color
145 ),
146 ),
147 )
@@ -153,7 +153,7 @@ class AddressBookPage extends BasePage {
153 ? Container(
154 width: double.infinity,
155 height: 1,
156 - color: PaletteDark.mainBackgroundColor,
156 + color: Theme.of(context).dividerColor,
157 )
158 : Offstage(),
159 ],
lib/src/screens/address_book/contact_page.dart
+5 -11
@@ -10,7 +10,6 @@ import 'package:cake_wallet/src/screens/base_page.dart';
10 import 'package:cake_wallet/src/widgets/primary_button.dart';
11 import 'package:cake_wallet/src/widgets/address_text_field.dart';
12 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
13 -import 'package:cake_wallet/palette.dart';
13 import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
14 import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart';
15 import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
@@ -23,9 +22,6 @@ class ContactPage extends BasePage {
22 @override
23 String get title => S.current.contact;
24
26 - @override
27 - Color get backgroundColor => PaletteDark.historyPanel;
28 -
25 @override
26 Widget body(BuildContext context) => ContactForm(contact);
27 }
@@ -45,10 +41,6 @@ class ContactFormState extends State<ContactForm> {
41 final _currencyTypeController = TextEditingController();
42 final _addressController = TextEditingController();
43 final currencies = CryptoCurrency.all;
48 - final downArrow = Image.asset(
49 - 'assets/images/arrow_bottom_purple_icon.png',
50 - color: PaletteDark.walletCardText,
51 - height: 8);
44
45 CryptoCurrency _selectectCrypto;
46
@@ -90,13 +82,17 @@ class ContactFormState extends State<ContactForm> {
82 @override
83 Widget build(BuildContext context) {
84 final addressBookStore = Provider.of<AddressBookStore>(context);
85 + final downArrow = Image.asset(
86 + 'assets/images/arrow_bottom_purple_icon.png',
87 + color: Theme.of(context).dividerColor,
88 + height: 8);
89
90 _contactNameController.addListener(() {onHandleControllers(addressBookStore);});
91 _currencyTypeController.addListener(() {onHandleControllers(addressBookStore);});
92 _addressController.addListener(() {onHandleControllers(addressBookStore);});
93
94 return Container(
99 - color: PaletteDark.historyPanel,
95 + color: Theme.of(context).backgroundColor,
96 child: ScrollableWithBottomSection(
97 contentPadding: EdgeInsets.all(24),
98 content: Form(
@@ -107,7 +103,6 @@ class ContactFormState extends State<ContactForm> {
103 BaseTextFormField(
104 controller: _contactNameController,
105 hintText: S.of(context).contact_name,
110 - borderColor: PaletteDark.walletCardSubAddressField,
106 validator: (value) {
107 addressBookStore.validateContactName(value);
108 return addressBookStore.errorMessage;
@@ -122,7 +117,6 @@ class ContactFormState extends State<ContactForm> {
117 child: BaseTextFormField(
118 controller: _currencyTypeController,
119 hintText: S.of(context).settings_currency,
125 - borderColor: PaletteDark.walletCardSubAddressField,
120 suffixIcon: Row(
121 mainAxisSize: MainAxisSize.min,
122 mainAxisAlignment: MainAxisAlignment.end,
lib/src/screens/auth/auth_page.dart
+1 -2
@@ -8,7 +8,6 @@ import 'package:cake_wallet/src/stores/auth/auth_store.dart';
8 import 'package:cake_wallet/src/screens/pin_code/pin_code.dart';
9 import 'package:cake_wallet/src/stores/settings/settings_store.dart';
10 import 'package:cake_wallet/src/domain/common/biometric_auth.dart';
11 -import 'package:cake_wallet/palette.dart';
11
12 typedef OnAuthenticationFinished = void Function(bool, AuthPageState);
13
@@ -139,7 +138,7 @@ class AuthPageState extends State<AuthPage> {
138 ),
139 )
140 : Container(),
142 - backgroundColor: PaletteDark.historyPanel,
141 + backgroundColor: Theme.of(context).backgroundColor,
142 border: null,
143 ),
144 resizeToAvoidBottomPadding: false,
lib/src/screens/base_page.dart
+18 -22
@@ -4,13 +4,15 @@ import 'package:cake_wallet/src/widgets/nav_bar.dart';
4 import 'package:provider/provider.dart';
5 import 'package:cake_wallet/themes.dart';
6 import 'package:cake_wallet/theme_changer.dart';
7 +import 'package:cake_wallet/palette.dart';
8
9 enum AppBarStyle { regular, withShadow }
10
11 abstract class BasePage extends StatelessWidget {
12 String get title => null;
13 bool get isModalBackButton => false;
13 - Color get backgroundColor => Colors.white;
14 + Color get backgroundLightColor => Colors.white;
15 + Color get backgroundDarkColor => PaletteDark.darkNightBlue;
16 bool get resizeToAvoidBottomPadding => true;
17 AppBarStyle get appBarStyle => AppBarStyle.regular;
18
@@ -31,16 +33,13 @@ abstract class BasePage extends StatelessWidget {
33 final _themeChanger = Provider.of<ThemeChanger>(context);
34 Image _closeButton, _backButton;
35
34 - _backButton = _backArrowImageDarkTheme;
35 - _closeButton = _closeButtonImageDarkTheme;
36 -
37 - /*if (_themeChanger.getTheme() == Themes.darkTheme) {
36 + if (_themeChanger.getTheme() == Themes.darkTheme) {
37 _backButton = _backArrowImageDarkTheme;
38 _closeButton = _closeButtonImageDarkTheme;
39 } else {
40 _backButton = _backArrowImage;
41 _closeButton = _closeButtonImage;
43 - }*/
42 + }
43
44 return SizedBox(
45 height: 37,
@@ -65,8 +64,7 @@ abstract class BasePage extends StatelessWidget {
64 style: TextStyle(
65 fontSize: 18.0,
66 fontWeight: FontWeight.bold,
68 - color: Colors.white),
69 - //color: Theme.of(context).primaryTextTheme.title.color),
67 + color: Theme.of(context).primaryTextTheme.title.color),
68 );
69 }
70
@@ -85,10 +83,9 @@ abstract class BasePage extends StatelessWidget {
83 leading: leading(context),
84 middle: middle(context),
85 trailing: trailing(context),
88 - backgroundColor: backgroundColor);
89 - /*backgroundColor: _isDarkTheme
90 - ? Theme.of(context).backgroundColor
91 - : backgroundColor);*/
86 + backgroundColor: _isDarkTheme
87 + ? backgroundDarkColor
88 + : backgroundLightColor);
89
90 case AppBarStyle.withShadow:
91 return NavBar.withShadow(
@@ -96,10 +93,9 @@ abstract class BasePage extends StatelessWidget {
93 leading: leading(context),
94 middle: middle(context),
95 trailing: trailing(context),
99 - backgroundColor: backgroundColor);
100 - /*backgroundColor: _isDarkTheme
101 - ? Theme.of(context).backgroundColor
102 - : backgroundColor);*/
96 + backgroundColor: _isDarkTheme
97 + ? backgroundDarkColor
98 + : backgroundLightColor);
99
100 default:
101 return NavBar(
@@ -107,10 +103,9 @@ abstract class BasePage extends StatelessWidget {
103 leading: leading(context),
104 middle: middle(context),
105 trailing: trailing(context),
110 - backgroundColor: backgroundColor);
111 - /*backgroundColor: _isDarkTheme
112 - ? Theme.of(context).backgroundColor
113 - : backgroundColor);*/
106 + backgroundColor: _isDarkTheme
107 + ? backgroundDarkColor
108 + : backgroundLightColor);
109 }
110 }
111
@@ -122,8 +117,9 @@ abstract class BasePage extends StatelessWidget {
117 final _isDarkTheme = _themeChanger.getTheme() == Themes.darkTheme;
118
119 return Scaffold(
125 - backgroundColor:
126 - _isDarkTheme ? Theme.of(context).backgroundColor : backgroundColor,
120 + backgroundColor: _isDarkTheme
121 + ? backgroundDarkColor
122 + : backgroundLightColor,
123 resizeToAvoidBottomPadding: resizeToAvoidBottomPadding,
124 appBar: appBar(context),
125 body: SafeArea(child: body(context)),
lib/src/screens/dashboard/dashboard_page.dart
+52 -45
@@ -1,43 +1,14 @@
1 -import 'package:cake_wallet/src/screens/dashboard/widgets/menu_widget.dart';
1 import 'package:flutter/material.dart';
2 import 'package:flutter/cupertino.dart';
4 -import 'package:cake_wallet/palette.dart';
5 -import 'package:cake_wallet/src/screens/base_page.dart';
3 import 'package:cake_wallet/src/screens/dashboard/widgets/wallet_card.dart';
4 import 'package:cake_wallet/src/screens/dashboard/widgets/trade_history_panel.dart';
5 +import 'package:cake_wallet/src/screens/dashboard/widgets/menu_widget.dart';
6
9 -class DashboardPage extends BasePage {
7 +class DashboardPage extends StatelessWidget {
8 final _bodyKey = GlobalKey();
9
10 @override
13 - Color get backgroundColor => PaletteDark.mainBackgroundColor;
14 -
15 - @override
16 - Widget trailing(BuildContext context) {
17 - final menuButton = Image.asset('assets/images/header.png');
18 -
19 - return SizedBox(
20 - height: 37,
21 - width: 37,
22 - child: ButtonTheme(
23 - minWidth: double.minPositive,
24 - child: FlatButton(
25 - highlightColor: Colors.transparent,
26 - splashColor: Colors.transparent,
27 - padding: EdgeInsets.all(0),
28 - onPressed: () async {
29 - await showDialog<void>(
30 - builder: (_) => MenuWidget(),
31 - context: context
32 - );
33 - },
34 - child: menuButton),
35 - ),
36 - );
37 - }
38 -
39 - @override
40 - Widget body(BuildContext context) => DashboardPageBody(key: _bodyKey);
11 + Widget build(BuildContext context) => DashboardPageBody(key: _bodyKey);
12 }
13
14 class DashboardPageBody extends StatefulWidget {
@@ -51,21 +22,57 @@ class DashboardPageBodyState extends State<DashboardPageBody> {
22
23 @override
24 Widget build(BuildContext context) {
25 + final menuButton = Image.asset('assets/images/header.png',
26 + color: Theme.of(context).primaryTextTheme.title.color,
27 + );
28
29 return SafeArea(
56 - child: Container(
57 - color: PaletteDark.mainBackgroundColor,
58 - child: Column(
59 - children: <Widget>[
60 - Padding(
61 - padding: EdgeInsets.only(left: 20, top: 10),
62 - child: WalletCard(),
63 - ),
64 - SizedBox(
65 - height: 28,
66 - ),
67 - Expanded(child: TradeHistoryPanel())
68 - ],
30 + child: Scaffold(
31 + body: Container(
32 + decoration: BoxDecoration(
33 + gradient: LinearGradient(
34 + colors: [
35 + Theme.of(context).scaffoldBackgroundColor,
36 + Theme.of(context).primaryColor
37 + ],
38 + begin: Alignment.centerLeft,
39 + end: Alignment.centerRight
40 + )
41 + ),
42 + child: Column(
43 + children: <Widget>[
44 + Container(
45 + padding: EdgeInsets.only(top: 10, right: 10),
46 + alignment: Alignment.centerRight,
47 + child: SizedBox(
48 + height: 44,
49 + width: 44,
50 + child: ButtonTheme(
51 + minWidth: double.minPositive,
52 + child: FlatButton(
53 + highlightColor: Colors.transparent,
54 + splashColor: Colors.transparent,
55 + padding: EdgeInsets.all(0),
56 + onPressed: () async {
57 + await showDialog<void>(
58 + builder: (_) => MenuWidget(),
59 + context: context
60 + );
61 + },
62 + child: menuButton),
63 + ),
64 + ),
65 + ),
66 + Padding(
67 + padding: EdgeInsets.only(left: 20, top: 20),
68 + child: WalletCard(),
69 + ),
70 + SizedBox(
71 + height: 28,
72 + ),
73 + Expanded(child: TradeHistoryPanel())
74 + ],
75 + ),
76 ),
77 ),
78 );
lib/src/screens/dashboard/widgets/button_header.dart
+177 -168
@@ -2,24 +2,33 @@ import 'package:cake_wallet/src/domain/exchange/exchange_provider_description.da
2 import 'package:cake_wallet/src/stores/action_list/action_list_store.dart';
3 import 'package:flutter/cupertino.dart';
4 import 'package:flutter/material.dart';
5 -import 'package:cake_wallet/palette.dart';
5 import 'package:cake_wallet/generated/i18n.dart';
6 import 'package:flutter_mobx/flutter_mobx.dart';
7 import 'package:provider/provider.dart';
8 import 'package:cake_wallet/routes.dart';
9 import 'package:date_range_picker/date_range_picker.dart' as date_rage_picker;
10 +import 'package:cake_wallet/themes.dart';
11 +import 'package:cake_wallet/theme_changer.dart';
12
13 class ButtonHeader extends SliverPersistentHeaderDelegate {
14 final sendImage = Image.asset('assets/images/send.png');
15 final exchangeImage = Image.asset('assets/images/exchange.png');
16 final buyImage = Image.asset('assets/images/coins.png');
16 - final filterButton = Image.asset('assets/images/filter_button.png');
17
18 @override
19 Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {
20 final actionListStore = Provider.of<ActionListStore>(context);
21 final historyPanelWidth = MediaQuery.of(context).size.width;
22
23 + final _themeChanger = Provider.of<ThemeChanger>(context);
24 + Image filterButton;
25 +
26 + if (_themeChanger.getTheme() == Themes.darkTheme) {
27 + filterButton = Image.asset('assets/images/filter_button.png');
28 + } else {
29 + filterButton = Image.asset('assets/images/filter_light_button.png');
30 + }
31 +
32 double buttonsOpacity = 1 - shrinkOffset / (maxExtent - minExtent);
33 double buttonsHeight = maxExtent - minExtent - shrinkOffset;
34
@@ -68,173 +77,173 @@ class ButtonHeader extends SliverPersistentHeaderDelegate {
77 Positioned(
78 top: buttonsHeight,
79 left: 0,
71 - child: Container(
72 - width: historyPanelWidth,
73 - height: 66,
74 - padding: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 10),
75 - decoration: BoxDecoration(
76 - borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)),
77 - color: PaletteDark.historyPanel,
78 - ),
79 - child: Stack(
80 - alignment: Alignment.center,
81 - children: <Widget>[
82 - Text(
83 - S.of(context).trade_history_title,
84 - style: TextStyle(
85 - fontSize: 20,
86 - color: Colors.white
80 + child: ClipRRect(
81 + borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)),
82 + child: Container(
83 + width: historyPanelWidth,
84 + height: 66,
85 + padding: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 10),
86 + color: Theme.of(context).backgroundColor,
87 + child: Stack(
88 + alignment: Alignment.center,
89 + children: <Widget>[
90 + Text(
91 + S.of(context).trade_history_title,
92 + style: TextStyle(
93 + fontSize: 20,
94 + color: Theme.of(context).primaryTextTheme.title.color
95 + ),
96 ),
88 - ),
89 - Positioned(
90 - right: 0,
91 - child: PopupMenuButton<int>(
92 - itemBuilder: (context) => [
93 - PopupMenuItem(
94 - enabled: false,
95 - value: -1,
96 - child: Text(S.of(context).transactions,
97 - style: TextStyle(
98 - fontWeight: FontWeight.bold,
99 - color: Theme.of(context).primaryTextTheme.caption.color))),
100 - PopupMenuItem(
101 - value: 0,
102 - child: Observer(
103 - builder: (_) => Row(
104 - mainAxisAlignment:
105 - MainAxisAlignment
106 - .spaceBetween,
107 - children: [
108 - Text(S.of(context).incoming),
109 - Checkbox(
110 - value: actionListStore
111 - .transactionFilterStore
112 - .displayIncoming,
113 - onChanged: (value) =>
114 - actionListStore
115 - .transactionFilterStore
116 - .toggleIncoming(),
117 - )
118 - ]))),
119 - PopupMenuItem(
120 - value: 1,
121 - child: Observer(
122 - builder: (_) => Row(
123 - mainAxisAlignment:
124 - MainAxisAlignment
125 - .spaceBetween,
126 - children: [
127 - Text(S.of(context).outgoing),
128 - Checkbox(
129 - value: actionListStore
130 - .transactionFilterStore
131 - .displayOutgoing,
132 - onChanged: (value) =>
133 - actionListStore
134 - .transactionFilterStore
135 - .toggleOutgoing(),
136 - )
137 - ]))),
138 - PopupMenuItem(
139 - value: 2,
140 - child:
141 - Text(S.of(context).transactions_by_date)),
142 - PopupMenuDivider(),
143 - PopupMenuItem(
144 - enabled: false,
145 - value: -1,
146 - child: Text(S.of(context).trades,
147 - style: TextStyle(
148 - fontWeight: FontWeight.bold,
149 - color: Theme.of(context).primaryTextTheme.caption.color))),
150 - PopupMenuItem(
151 - value: 3,
152 - child: Observer(
153 - builder: (_) => Row(
154 - mainAxisAlignment:
155 - MainAxisAlignment
156 - .spaceBetween,
157 - children: [
158 - Text('XMR.TO'),
159 - Checkbox(
160 - value: actionListStore
161 - .tradeFilterStore
162 - .displayXMRTO,
163 - onChanged: (value) =>
164 - actionListStore
165 - .tradeFilterStore
166 - .toggleDisplayExchange(
167 - ExchangeProviderDescription
168 - .xmrto),
169 - )
170 - ]))),
171 - PopupMenuItem(
172 - value: 4,
173 - child: Observer(
174 - builder: (_) => Row(
175 - mainAxisAlignment:
176 - MainAxisAlignment
177 - .spaceBetween,
178 - children: [
179 - Text('Change.NOW'),
180 - Checkbox(
181 - value: actionListStore
182 - .tradeFilterStore
183 - .displayChangeNow,
184 - onChanged: (value) =>
185 - actionListStore
186 - .tradeFilterStore
187 - .toggleDisplayExchange(
188 - ExchangeProviderDescription
189 - .changeNow),
190 - )
191 - ]))),
192 - PopupMenuItem(
193 - value: 5,
194 - child: Observer(
195 - builder: (_) => Row(
196 - mainAxisAlignment:
197 - MainAxisAlignment
198 - .spaceBetween,
199 - children: [
200 - Text('MorphToken'),
201 - Checkbox(
202 - value: actionListStore
203 - .tradeFilterStore
204 - .displayMorphToken,
205 - onChanged: (value) =>
206 - actionListStore
207 - .tradeFilterStore
208 - .toggleDisplayExchange(
209 - ExchangeProviderDescription
210 - .morphToken),
211 - )
212 - ])))
213 - ],
214 - child: filterButton,
215 - onSelected: (item) async {
216 - if (item == 2) {
217 - final List<DateTime> picked =
218 - await date_rage_picker.showDatePicker(
219 - context: context,
220 - initialFirstDate: DateTime.now()
221 - .subtract(Duration(days: 1)),
222 - initialLastDate: (DateTime.now()),
223 - firstDate: DateTime(2015),
224 - lastDate: DateTime.now()
225 - .add(Duration(days: 1)));
97 + Positioned(
98 + right: 0,
99 + child: PopupMenuButton<int>(
100 + itemBuilder: (context) => [
101 + PopupMenuItem(
102 + enabled: false,
103 + value: -1,
104 + child: Text(S.of(context).transactions,
105 + style: TextStyle(
106 + fontWeight: FontWeight.bold,
107 + color: Theme.of(context).primaryTextTheme.caption.color))),
108 + PopupMenuItem(
109 + value: 0,
110 + child: Observer(
111 + builder: (_) => Row(
112 + mainAxisAlignment:
113 + MainAxisAlignment
114 + .spaceBetween,
115 + children: [
116 + Text(S.of(context).incoming),
117 + Checkbox(
118 + value: actionListStore
119 + .transactionFilterStore
120 + .displayIncoming,
121 + onChanged: (value) =>
122 + actionListStore
123 + .transactionFilterStore
124 + .toggleIncoming(),
125 + )
126 + ]))),
127 + PopupMenuItem(
128 + value: 1,
129 + child: Observer(
130 + builder: (_) => Row(
131 + mainAxisAlignment:
132 + MainAxisAlignment
133 + .spaceBetween,
134 + children: [
135 + Text(S.of(context).outgoing),
136 + Checkbox(
137 + value: actionListStore
138 + .transactionFilterStore
139 + .displayOutgoing,
140 + onChanged: (value) =>
141 + actionListStore
142 + .transactionFilterStore
143 + .toggleOutgoing(),
144 + )
145 + ]))),
146 + PopupMenuItem(
147 + value: 2,
148 + child:
149 + Text(S.of(context).transactions_by_date)),
150 + PopupMenuDivider(),
151 + PopupMenuItem(
152 + enabled: false,
153 + value: -1,
154 + child: Text(S.of(context).trades,
155 + style: TextStyle(
156 + fontWeight: FontWeight.bold,
157 + color: Theme.of(context).primaryTextTheme.caption.color))),
158 + PopupMenuItem(
159 + value: 3,
160 + child: Observer(
161 + builder: (_) => Row(
162 + mainAxisAlignment:
163 + MainAxisAlignment
164 + .spaceBetween,
165 + children: [
166 + Text('XMR.TO'),
167 + Checkbox(
168 + value: actionListStore
169 + .tradeFilterStore
170 + .displayXMRTO,
171 + onChanged: (value) =>
172 + actionListStore
173 + .tradeFilterStore
174 + .toggleDisplayExchange(
175 + ExchangeProviderDescription
176 + .xmrto),
177 + )
178 + ]))),
179 + PopupMenuItem(
180 + value: 4,
181 + child: Observer(
182 + builder: (_) => Row(
183 + mainAxisAlignment:
184 + MainAxisAlignment
185 + .spaceBetween,
186 + children: [
187 + Text('Change.NOW'),
188 + Checkbox(
189 + value: actionListStore
190 + .tradeFilterStore
191 + .displayChangeNow,
192 + onChanged: (value) =>
193 + actionListStore
194 + .tradeFilterStore
195 + .toggleDisplayExchange(
196 + ExchangeProviderDescription
197 + .changeNow),
198 + )
199 + ]))),
200 + PopupMenuItem(
201 + value: 5,
202 + child: Observer(
203 + builder: (_) => Row(
204 + mainAxisAlignment:
205 + MainAxisAlignment
206 + .spaceBetween,
207 + children: [
208 + Text('MorphToken'),
209 + Checkbox(
210 + value: actionListStore
211 + .tradeFilterStore
212 + .displayMorphToken,
213 + onChanged: (value) =>
214 + actionListStore
215 + .tradeFilterStore
216 + .toggleDisplayExchange(
217 + ExchangeProviderDescription
218 + .morphToken),
219 + )
220 + ])))
221 + ],
222 + child: filterButton,
223 + onSelected: (item) async {
224 + if (item == 2) {
225 + final List<DateTime> picked =
226 + await date_rage_picker.showDatePicker(
227 + context: context,
228 + initialFirstDate: DateTime.now()
229 + .subtract(Duration(days: 1)),
230 + initialLastDate: (DateTime.now()),
231 + firstDate: DateTime(2015),
232 + lastDate: DateTime.now()
233 + .add(Duration(days: 1)));
234
227 - if (picked != null && picked.length == 2) {
228 - actionListStore.transactionFilterStore
229 - .changeStartDate(picked.first);
230 - actionListStore.transactionFilterStore
231 - .changeEndDate(picked.last);
235 + if (picked != null && picked.length == 2) {
236 + actionListStore.transactionFilterStore
237 + .changeStartDate(picked.first);
238 + actionListStore.transactionFilterStore
239 + .changeEndDate(picked.last);
240 + }
241 }
233 - }
234 - },
235 - ),
236 - )
237 - ],
242 + },
243 + ),
244 + )
245 + ],
246 + ),
247 ),
248 )
249 )
@@ -274,7 +283,7 @@ class ButtonHeader extends SliverPersistentHeaderDelegate {
283 width: 48,
284 alignment: Alignment.center,
285 decoration: BoxDecoration(
277 - color: PaletteDark.borderCardColor,
286 + color: Theme.of(context).primaryTextTheme.subhead.color,
287 shape: BoxShape.circle
288 ),
289 child: image,
@@ -286,7 +295,7 @@ class ButtonHeader extends SliverPersistentHeaderDelegate {
295 title,
296 style: TextStyle(
297 fontSize: 16,
289 - color: PaletteDark.walletCardText
298 + color: Theme.of(context).primaryTextTheme.caption.color
299 ),
300 ),
301 )
lib/src/screens/dashboard/widgets/date_section_raw.dart
+6 -4
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2 import 'package:intl/intl.dart';
3 import 'package:cake_wallet/generated/i18n.dart';
4 import 'package:provider/provider.dart';
@@ -40,14 +39,17 @@ class DateSectionRaw extends StatelessWidget {
39 padding: EdgeInsets.only(top: 10, bottom: 10, left: 20, right: 20),
40 alignment: Alignment.center,
41 decoration: BoxDecoration(
43 - color: PaletteDark.historyPanel,
42 + color: Theme.of(context).backgroundColor,
43 border: Border.all(
44 width: 1,
46 - color: PaletteDark.historyPanel
45 + color: Theme.of(context).backgroundColor
46 ),
47 ),
48 child: Text(title,
50 - style: TextStyle(fontSize: 12, color: PaletteDark.historyPanelText))
49 + style: TextStyle(
50 + fontSize: 12,
51 + color: Theme.of(context).primaryTextTheme.headline.color
52 + ))
53 );
54 }
55 }
lib/src/screens/dashboard/widgets/menu_widget.dart
+12 -12
@@ -78,7 +78,7 @@ class MenuWidgetState extends State<MenuWidget> {
78 child: BackdropFilter(
79 filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
80 child: Container(
81 - decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
81 + decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)),
82 child: Row(
83 mainAxisSize: MainAxisSize.max,
84 crossAxisAlignment: CrossAxisAlignment.center,
@@ -91,7 +91,7 @@ class MenuWidgetState extends State<MenuWidget> {
91 width: 4,
92 decoration: BoxDecoration(
93 borderRadius: BorderRadius.all(Radius.circular(2)),
94 - color: PaletteDark.walletCardText
94 + color: Theme.of(context).hintColor //
95 ),
96 )
97 : Container(
@@ -115,7 +115,7 @@ class MenuWidgetState extends State<MenuWidget> {
115 curve: Curves.fastOutSlowIn,
116 decoration: BoxDecoration(
117 borderRadius: BorderRadius.only(topLeft: Radius.circular(24), bottomLeft: Radius.circular(24)),
118 - color: PaletteDark.menuList.withOpacity(opacity)
118 + color: Theme.of(context).primaryTextTheme.display1.color.withOpacity(opacity)
119 ),
120 child: isDraw
121 ? ListView.separated(
@@ -131,7 +131,7 @@ class MenuWidgetState extends State<MenuWidget> {
131 bottom: fromBottomEdge),
132 decoration: BoxDecoration(
133 borderRadius: BorderRadius.only(topLeft: Radius.circular(24)),
134 - color: PaletteDark.menuHeader
134 + color: Theme.of(context).primaryTextTheme.display2.color
135 ),
136 child: Row(
137 mainAxisAlignment: MainAxisAlignment.start,
@@ -148,7 +148,7 @@ class MenuWidgetState extends State<MenuWidget> {
148 Text(
149 walletStore.name,
150 style: TextStyle(
151 - color: Colors.white,
151 + color: Theme.of(context).primaryTextTheme.title.color,
152 decoration: TextDecoration.none,
153 fontFamily: 'Lato',
154 fontSize: 20,
@@ -158,7 +158,7 @@ class MenuWidgetState extends State<MenuWidget> {
158 Text(
159 walletStore.account.label,
160 style: TextStyle(
161 - color: PaletteDark.walletCardText,
161 + color: Theme.of(context).primaryTextTheme.caption.color,
162 decoration: TextDecoration.none,
163 fontFamily: 'Lato',
164 fontSize: 12
@@ -193,7 +193,7 @@ class MenuWidgetState extends State<MenuWidget> {
193 alignment: Alignment.topLeft,
194 decoration: BoxDecoration(
195 borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24)),
196 - color: PaletteDark.menuList,
196 + color: Theme.of(context).primaryTextTheme.display1.color,
197 ),
198 child: Row(
199 mainAxisAlignment: MainAxisAlignment.start,
@@ -206,7 +206,7 @@ class MenuWidgetState extends State<MenuWidget> {
206 item,
207 style: TextStyle(
208 decoration: TextDecoration.none,
209 - color: Colors.white,
209 + color: Theme.of(context).primaryTextTheme.title.color,
210 fontFamily: 'Lato',
211 fontSize: 20,
212 fontWeight: FontWeight.bold
@@ -219,7 +219,7 @@ class MenuWidgetState extends State<MenuWidget> {
219 : Container(
220 height: tileHeight,
221 padding: EdgeInsets.only(left: 24, right: 24),
222 - color: PaletteDark.menuList,
222 + color: Theme.of(context).primaryTextTheme.display1.color,
223 child: Row(
224 mainAxisAlignment: MainAxisAlignment.start,
225 crossAxisAlignment: CrossAxisAlignment.center,
@@ -231,7 +231,7 @@ class MenuWidgetState extends State<MenuWidget> {
231 item,
232 style: TextStyle(
233 decoration: TextDecoration.none,
234 - color: Colors.white,
234 + color: Theme.of(context).primaryTextTheme.title.color,
235 fontFamily: 'Lato',
236 fontSize: 20,
237 fontWeight: FontWeight.bold
@@ -244,9 +244,9 @@ class MenuWidgetState extends State<MenuWidget> {
244 );
245 },
246 separatorBuilder: (_, index) =>
247 - Divider(
247 + Container(
248 height: 1,
249 - color: PaletteDark.walletCardText,
249 + color: Theme.of(context).dividerColor,
250 ),
251 itemCount: itemCount + 1)
252 : Offstage()
lib/src/screens/dashboard/widgets/trade_history_panel.dart
+98 -96
@@ -6,7 +6,6 @@ import 'package:cake_wallet/src/stores/action_list/transaction_list_item.dart';
6 import 'package:cake_wallet/src/stores/settings/settings_store.dart';
7 import 'package:flutter/cupertino.dart';
8 import 'package:flutter/material.dart';
9 -import 'package:cake_wallet/palette.dart';
9 import 'package:flutter_mobx/flutter_mobx.dart';
10 import 'package:intl/intl.dart';
11 import 'package:provider/provider.dart';
@@ -58,101 +57,104 @@ class TradeHistoryPanelState extends State<TradeHistoryPanel> {
57 height: panelHeight,
58 duration: Duration(milliseconds: 1000),
59 curve: Curves.fastOutSlowIn,
61 - child: CustomScrollView(
62 - slivers: <Widget>[
63 - SliverPersistentHeader(
64 - delegate: ButtonHeader(),
65 - pinned: true,
66 - floating: false,
67 - ),
68 - Observer(
69 - key: _listObserverKey,
70 - builder: (_) {
71 - final items = actionListStore.items == null
72 - ? <String>[]
73 - : actionListStore.items;
74 - final itemsCount = items.length + 1;
75 - final symbol = settingsStore.fiatCurrency.toString();
76 - double freeSpaceHeight = MediaQuery.of(context).size.height - 496;
77 -
78 - return SliverList(
79 - key: _listKey,
80 - delegate: SliverChildBuilderDelegate(
81 - (context, index) {
82 -
83 - if (index == itemsCount - 1) {
84 - freeSpaceHeight = freeSpaceHeight >= 0 ? freeSpaceHeight : 0;
85 -
86 - return Container(
87 - height: freeSpaceHeight,
88 - width: MediaQuery.of(context).size.width,
89 - color: PaletteDark.historyPanel,
90 - );
91 - }
92 -
93 - final item = items[index];
94 -
95 - if (item is DateSectionItem) {
96 - freeSpaceHeight -= 38;
97 - return DateSectionRaw(date: item.date);
98 - }
99 -
100 - if (item is TransactionListItem) {
101 - freeSpaceHeight -= 62;
102 - final transaction = item.transaction;
103 - final savedDisplayMode = settingsStore.balanceDisplayMode;
104 - final formattedAmount =
105 - savedDisplayMode == BalanceDisplayMode.hiddenBalance
106 - ? '---'
107 - : transaction.amountFormatted();
108 - final formattedFiatAmount =
109 - savedDisplayMode == BalanceDisplayMode.hiddenBalance
110 - ? '---'
111 - : transaction.fiatAmount(symbol);
112 -
113 - return TransactionRow(
114 - onTap: () => Navigator.of(context).pushNamed(
115 - Routes.transactionDetails,
116 - arguments: transaction),
117 - direction: transaction.direction,
118 - formattedDate:
119 - transactionDateFormat.format(transaction.date),
120 - formattedAmount: formattedAmount,
121 - formattedFiatAmount: formattedFiatAmount,
122 - isPending: transaction.isPending);
123 - }
124 -
125 - if (item is TradeListItem) {
126 - freeSpaceHeight -= 62;
127 - final trade = item.trade;
128 - final savedDisplayMode = settingsStore.balanceDisplayMode;
129 - final formattedAmount = trade.amount != null
130 - ? savedDisplayMode == BalanceDisplayMode.hiddenBalance
131 - ? '---'
132 - : trade.amountFormatted()
133 - : trade.amount;
134 -
135 - return TradeRow(
136 - onTap: () => Navigator.of(context)
137 - .pushNamed(Routes.tradeDetails, arguments: trade),
138 - provider: trade.provider,
139 - from: trade.from,
140 - to: trade.to,
141 - createdAtFormattedDate:
142 - transactionDateFormat.format(trade.createdAt),
143 - formattedAmount: formattedAmount);
144 - }
145 -
146 - return Container(
147 - color: PaletteDark.historyPanel
148 - );
149 - },
150 -
151 - childCount: itemsCount
152 - )
153 - );
154 - })
155 - ],
60 + child: ClipRRect(
61 + borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)),
62 + child: CustomScrollView(
63 + slivers: <Widget>[
64 + SliverPersistentHeader(
65 + delegate: ButtonHeader(),
66 + pinned: true,
67 + floating: false,
68 + ),
69 + Observer(
70 + key: _listObserverKey,
71 + builder: (_) {
72 + final items = actionListStore.items == null
73 + ? <String>[]
74 + : actionListStore.items;
75 + final itemsCount = items.length + 1;
76 + final symbol = settingsStore.fiatCurrency.toString();
77 + double freeSpaceHeight = MediaQuery.of(context).size.height - 496;
78 +
79 + return SliverList(
80 + key: _listKey,
81 + delegate: SliverChildBuilderDelegate(
82 + (context, index) {
83 +
84 + if (index == itemsCount - 1) {
85 + freeSpaceHeight = freeSpaceHeight >= 0 ? freeSpaceHeight : 0;
86 +
87 + return Container(
88 + height: freeSpaceHeight,
89 + width: MediaQuery.of(context).size.width,
90 + color: Theme.of(context).backgroundColor,
91 + );
92 + }
93 +
94 + final item = items[index];
95 +
96 + if (item is DateSectionItem) {
97 + freeSpaceHeight -= 38;
98 + return DateSectionRaw(date: item.date);
99 + }
100 +
101 + if (item is TransactionListItem) {
102 + freeSpaceHeight -= 62;
103 + final transaction = item.transaction;
104 + final savedDisplayMode = settingsStore.balanceDisplayMode;
105 + final formattedAmount =
106 + savedDisplayMode == BalanceDisplayMode.hiddenBalance
107 + ? '---'
108 + : transaction.amountFormatted();
109 + final formattedFiatAmount =
110 + savedDisplayMode == BalanceDisplayMode.hiddenBalance
111 + ? '---'
112 + : transaction.fiatAmount(symbol);
113 +
114 + return TransactionRow(
115 + onTap: () => Navigator.of(context).pushNamed(
116 + Routes.transactionDetails,
117 + arguments: transaction),
118 + direction: transaction.direction,
119 + formattedDate:
120 + transactionDateFormat.format(transaction.date),
121 + formattedAmount: formattedAmount,
122 + formattedFiatAmount: formattedFiatAmount,
123 + isPending: transaction.isPending);
124 + }
125 +
126 + if (item is TradeListItem) {
127 + freeSpaceHeight -= 62;
128 + final trade = item.trade;
129 + final savedDisplayMode = settingsStore.balanceDisplayMode;
130 + final formattedAmount = trade.amount != null
131 + ? savedDisplayMode == BalanceDisplayMode.hiddenBalance
132 + ? '---'
133 + : trade.amountFormatted()
134 + : trade.amount;
135 +
136 + return TradeRow(
137 + onTap: () => Navigator.of(context)
138 + .pushNamed(Routes.tradeDetails, arguments: trade),
139 + provider: trade.provider,
140 + from: trade.from,
141 + to: trade.to,
142 + createdAtFormattedDate:
143 + transactionDateFormat.format(trade.createdAt),
144 + formattedAmount: formattedAmount);
145 + }
146 +
147 + return Container(
148 + color: Theme.of(context).backgroundColor
149 + );
150 + },
151 +
152 + childCount: itemsCount
153 + )
154 + );
155 + })
156 + ],
157 + ),
158 )
159 ),
160 );
lib/src/screens/dashboard/widgets/trade_row.dart
+8 -9
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2 import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
3 import 'package:cake_wallet/src/domain/exchange/exchange_provider_description.dart';
4
@@ -28,10 +27,10 @@ class TradeRow extends StatelessWidget {
27 child: Container(
28 height: 60,
29 decoration: BoxDecoration(
31 - color: PaletteDark.historyPanel,
30 + color: Theme.of(context).backgroundColor,
31 border: Border.all(
32 width: 1,
34 - color: PaletteDark.historyPanel
33 + color: Theme.of(context).backgroundColor
34 ),
35 ),
36 padding: EdgeInsets.only(top: 5, bottom: 5, left: 20, right: 20),
@@ -41,7 +40,7 @@ class TradeRow extends StatelessWidget {
40 width: 36,
41 decoration: BoxDecoration(
42 shape: BoxShape.circle,
44 - color: PaletteDark.historyPanelButton
43 + color: Theme.of(context).backgroundColor
44 ),
45 child: _getPoweredImage(provider),
46 ),
@@ -56,13 +55,13 @@ class TradeRow extends StatelessWidget {
55 Text('${from.toString()} → ${to.toString()}',
56 style: TextStyle(
57 fontSize: 16,
59 - color: Colors.white
58 + color: Theme.of(context).primaryTextTheme.title.color
59 )),
60 formattedAmount != null
61 ? Text(formattedAmount + ' ' + amountCrypto,
63 - style: const TextStyle(
62 + style: TextStyle(
63 fontSize: 16,
65 - color: Colors.white
64 + color: Theme.of(context).primaryTextTheme.title.color
65 ))
66 : Container()
67 ]),
@@ -71,8 +70,8 @@ class TradeRow extends StatelessWidget {
70 mainAxisAlignment: MainAxisAlignment.spaceBetween,
71 children: <Widget>[
72 Text(createdAtFormattedDate,
74 - style: const TextStyle(
75 - fontSize: 14, color: PaletteDark.historyPanelText))
73 + style: TextStyle(
74 + fontSize: 14, color: Theme.of(context).primaryTextTheme.headline.color))
75 ]),
76 ],
77 ),
lib/src/screens/dashboard/widgets/transaction_raw.dart
+10 -10
@@ -26,10 +26,10 @@ class TransactionRow extends StatelessWidget {
26 child: Container(
27 height: 60,
28 decoration: BoxDecoration(
29 - color: PaletteDark.historyPanel,
29 + color: Theme.of(context).backgroundColor,
30 border: Border.all(
31 width: 1,
32 - color: PaletteDark.historyPanel
32 + color: Theme.of(context).backgroundColor
33 ),
34 ),
35 padding: EdgeInsets.only(top: 5, bottom: 5, left: 20, right: 20),
@@ -39,7 +39,7 @@ class TransactionRow extends StatelessWidget {
39 width: 36,
40 decoration: BoxDecoration(
41 shape: BoxShape.circle,
42 - color: PaletteDark.historyPanelButton
42 + color: Theme.of(context).primaryTextTheme.display3.color
43 ),
44 child: Image.asset(
45 direction == TransactionDirection.incoming
@@ -62,14 +62,14 @@ class TransactionRow extends StatelessWidget {
62 (isPending ? S.of(context).pending : ''),
63 style: TextStyle(
64 fontSize: 16,
65 - color: Colors.white
65 + color: Theme.of(context).primaryTextTheme.title.color
66 )),
67 Text(direction == TransactionDirection.incoming
68 ? formattedAmount
69 : '- ' + formattedAmount,
70 - style: const TextStyle(
70 + style: TextStyle(
71 fontSize: 16,
72 - color: Colors.white
72 + color: Theme.of(context).primaryTextTheme.title.color
73 ))
74 ]),
75 SizedBox(height: 5,),
@@ -77,13 +77,13 @@ class TransactionRow extends StatelessWidget {
77 mainAxisAlignment: MainAxisAlignment.spaceBetween,
78 children: <Widget>[
79 Text(formattedDate,
80 - style: const TextStyle(
81 - fontSize: 14, color: PaletteDark.historyPanelText)),
80 + style: TextStyle(
81 + fontSize: 14, color: Theme.of(context).primaryTextTheme.headline.color)),
82 Text(direction == TransactionDirection.incoming
83 ? formattedFiatAmount
84 : '- ' + formattedFiatAmount,
85 - style: const TextStyle(
86 - fontSize: 14, color: PaletteDark.historyPanelText))
85 + style: TextStyle(
86 + fontSize: 14, color: Theme.of(context).primaryTextTheme.headline.color))
87 ]),
88 ],
89 ),
lib/src/screens/dashboard/widgets/wallet_card.dart
+46 -38
@@ -1,4 +1,5 @@
1 import 'dart:async';
2 +import 'package:cake_wallet/palette.dart';
3 import 'package:cake_wallet/src/domain/common/balance_display_mode.dart';
4 import 'package:flutter/services.dart';
5 import 'package:provider/provider.dart';
@@ -9,7 +10,6 @@ import 'package:cake_wallet/src/stores/wallet/wallet_store.dart';
10 import 'package:flutter/cupertino.dart';
11 import 'package:flutter/material.dart';
12 import 'package:flutter_mobx/flutter_mobx.dart';
12 -import 'package:cake_wallet/palette.dart';
13 import 'package:cake_wallet/generated/i18n.dart';
14 import 'package:cake_wallet/src/domain/common/sync_status.dart';
15 import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
@@ -25,7 +25,6 @@ class WalletCardState extends State<WalletCard> {
25 final _balanceObserverKey = GlobalKey();
26 final _addressObserverKey = GlobalKey();
27
28 - final List<Color> colorsSync = [PaletteDark.walletCardSubAddressField, PaletteDark.walletCardBottomEndSync];
28 double cardWidth;
29 double cardHeight;
30 double screenWidth;
@@ -58,6 +57,11 @@ class WalletCardState extends State<WalletCard> {
57
58 @override
59 Widget build(BuildContext context) {
60 + final List<Color> colorsSync = [
61 + Theme.of(context).cardTheme.color,
62 + Theme.of(context).hoverColor
63 + ];
64 +
65 return Container(
66 width: double.infinity,
67 height: cardHeight,
@@ -75,38 +79,40 @@ class WalletCardState extends State<WalletCard> {
79 ),
80 decoration: BoxDecoration(
81 borderRadius: BorderRadius.only(topLeft: Radius.circular(10), bottomLeft: Radius.circular(10)),
78 - color: PaletteDark.borderCardColor,
82 + color: Theme.of(context).focusColor,
83 boxShadow: [
84 BoxShadow(
81 - color: PaletteDark.historyPanel.withOpacity(0.5),
85 + color: PaletteDark.darkNightBlue.withOpacity(0.5),
86 blurRadius: 8,
87 offset: Offset(5, 5))
88 ]
89 ),
86 - child: Container(
87 - width: cardWidth,
88 - height: cardHeight,
89 - decoration: BoxDecoration(
90 - borderRadius: BorderRadius.only(topLeft: Radius.circular(10), bottomLeft: Radius.circular(10)),
91 - color: PaletteDark.historyPanel
92 - ),
93 - child: InkWell(
94 - onTap: () => setState(() => isFrontSide = !isFrontSide),
95 - child: isFrontSide
96 - ? frontSide()
97 - : backSide()
90 + child: ClipRRect(
91 + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), bottomLeft: Radius.circular(10)),
92 + child: Container(
93 + width: cardWidth,
94 + height: cardHeight,
95 + color: Theme.of(context).cardColor,
96 + child: InkWell(
97 + onTap: () => setState(() => isFrontSide = !isFrontSide),
98 + child: isFrontSide
99 + ? frontSide(colorsSync)
100 + : backSide(colorsSync)
101 + ),
102 ),
99 - ),
103 + )
104 ),
105 );
106 }
107
104 - Widget frontSide() {
108 + Widget frontSide(List<Color> colorsSync) {
109 final syncStore = Provider.of<SyncStore>(context);
110 final walletStore = Provider.of<WalletStore>(context);
111 final settingsStore = Provider.of<SettingsStore>(context);
112 final balanceStore = Provider.of<BalanceStore>(context);
109 - final triangleButton = Image.asset('assets/images/triangle.png');
113 + final triangleButton = Image.asset('assets/images/triangle.png',
114 + color: Theme.of(context).primaryTextTheme.title.color,
115 + );
116
117 return Observer(
118 key: _syncingObserverKey,
@@ -159,7 +165,7 @@ class WalletCardState extends State<WalletCard> {
165 child: Container(
166 width: 1,
167 height: cardHeight,
162 - color: PaletteDark.borderCardColor,
168 + color: Theme.of(context).focusColor,
169 )
170 )
171 : Offstage(),
@@ -180,7 +186,7 @@ class WalletCardState extends State<WalletCard> {
186 crossAxisAlignment: CrossAxisAlignment.start,
187 children: <Widget>[
188 InkWell(
183 - onTap: () {print('TAP 2');},
189 + onTap: () {},
190 child: Row(
191 children: <Widget>[
192 Text(
@@ -188,7 +194,7 @@ class WalletCardState extends State<WalletCard> {
194 style: TextStyle(
195 fontSize: 20,
196 fontWeight: FontWeight.bold,
191 - color: Colors.white
197 + color: Theme.of(context).primaryTextTheme.title.color
198 ),
199 ),
200 SizedBox(width: 10),
@@ -202,8 +208,8 @@ class WalletCardState extends State<WalletCard> {
208 Text(
209 walletStore.account.label,
210 style: TextStyle(
205 - fontSize: 12,
206 - color: PaletteDark.walletCardText
211 + fontSize: 12,
212 + color: Theme.of(context).primaryTextTheme.caption.color
213 ),
214 )
215 ],
@@ -213,14 +219,14 @@ class WalletCardState extends State<WalletCard> {
219 height: 32,
220 alignment: Alignment.center,
221 decoration: BoxDecoration(
216 - color: PaletteDark.walletCardAddressField,
222 + color: Theme.of(context).accentTextTheme.subtitle.backgroundColor,
223 borderRadius: BorderRadius.all(Radius.circular(16))
224 ),
225 child: Text(
226 shortAddress,
227 style: TextStyle(
228 fontSize: 12,
223 - color: PaletteDark.walletCardAddressText
229 + color: Theme.of(context).primaryTextTheme.caption.color
230 ),
231 ),
232 )
@@ -265,7 +271,7 @@ class WalletCardState extends State<WalletCard> {
271 balanceDisplayMode.toString(),
272 style: TextStyle(
273 fontSize: 12,
268 - color: PaletteDark.walletCardText
274 + color: Theme.of(context).primaryTextTheme.caption.color
275 ),
276 ),
277 SizedBox(height: 5),
@@ -273,7 +279,7 @@ class WalletCardState extends State<WalletCard> {
279 balance,
280 style: TextStyle(
281 fontSize: 28,
276 - color: Colors.white
282 + color: Theme.of(context).primaryTextTheme.title.color
283 ),
284 )
285 ],
@@ -282,7 +288,7 @@ class WalletCardState extends State<WalletCard> {
288 fiatBalance,
289 style: TextStyle(
290 fontSize: 14,
285 - color: Colors.white
291 + color: Theme.of(context).primaryTextTheme.title.color
292 ),
293 )
294 ],
@@ -300,7 +306,7 @@ class WalletCardState extends State<WalletCard> {
306 statusText,
307 style: TextStyle(
308 fontSize: 12,
303 - color: PaletteDark.walletCardText
309 + color: Theme.of(context).primaryTextTheme.caption.color
310 ),
311 ),
312 SizedBox(height: 5),
@@ -308,7 +314,7 @@ class WalletCardState extends State<WalletCard> {
314 descriptionText,
315 style: TextStyle(
316 fontSize: 14,
311 - color: Colors.white
317 + color: Theme.of(context).primaryTextTheme.title.color
318 ),
319 )
320 ],
@@ -327,9 +333,11 @@ class WalletCardState extends State<WalletCard> {
333 );
334 }
335
330 - Widget backSide() {
336 + Widget backSide(List<Color> colorsSync) {
337 final walletStore = Provider.of<WalletStore>(context);
332 - final rightArrow = Image.asset('assets/images/right_arrow.png');
338 + final rightArrow = Image.asset('assets/images/right_arrow.png',
339 + color: Theme.of(context).primaryTextTheme.title.color,
340 + );
341 double messageBoxHeight = 0;
342 double messageBoxWidth = cardWidth - 10;
343
@@ -371,7 +379,7 @@ class WalletCardState extends State<WalletCard> {
379 S.current.card_address,
380 style: TextStyle(
381 fontSize: 12,
374 - color: PaletteDark.walletCardText
382 + color: Theme.of(context).primaryTextTheme.caption.color
383 ),
384 ),
385 GestureDetector(
@@ -397,7 +405,7 @@ class WalletCardState extends State<WalletCard> {
405 walletStore.subaddress.address,
406 style: TextStyle(
407 fontSize: 14,
400 - color: Colors.white
408 + color: Theme.of(context).primaryTextTheme.title.color
409 ),
410 ),
411 )
@@ -412,7 +420,7 @@ class WalletCardState extends State<WalletCard> {
420 child: QrImage(
421 data: walletStore.subaddress.address,
422 backgroundColor: Colors.transparent,
415 - foregroundColor: PaletteDark.walletCardText,
423 + foregroundColor: Theme.of(context).primaryTextTheme.caption.color
424 ),
425 )
426 ],
@@ -423,7 +431,7 @@ class WalletCardState extends State<WalletCard> {
431 alignment: Alignment.center,
432 decoration: BoxDecoration(
433 borderRadius: BorderRadius.all(Radius.circular(22)),
426 - color: PaletteDark.walletCardSubAddressField
434 + color: Theme.of(context).primaryTextTheme.overline.color
435 ),
436 child: InkWell(
437 onTap: () => Navigator.of(context,
@@ -436,7 +444,7 @@ class WalletCardState extends State<WalletCard> {
444 S.of(context).accounts_subaddresses,
445 style: TextStyle(
446 fontSize: 14,
439 - color: Colors.white
447 + color: Theme.of(context).primaryTextTheme.title.color
448 ),
449 ),
450 rightArrow
lib/src/screens/disclaimer/disclaimer_page.dart
+10 -14
@@ -2,7 +2,6 @@ import 'dart:ui';
2 import 'package:flutter/material.dart';
3 import 'package:flutter/cupertino.dart';
4 import 'package:flutter/services.dart';
5 -import 'package:cake_wallet/palette.dart';
5 import 'package:url_launcher/url_launcher.dart';
6 import 'package:cake_wallet/src/screens/base_page.dart';
7 import 'package:cake_wallet/src/widgets/primary_button.dart';
@@ -14,9 +13,6 @@ class DisclaimerPage extends BasePage {
13
14 final bool isReadOnly;
15
17 - @override
18 - Color get backgroundColor => PaletteDark.historyPanel;
19 -
16 @override
17 String get title => 'Terms of Use';
18
@@ -78,7 +74,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
74 @override
75 Widget build(BuildContext context) {
76 return Container(
81 - color: PaletteDark.historyPanel,
77 + color: Theme.of(context).backgroundColor,
78 child: Column(
79 children: <Widget>[
80 SizedBox(height: 10.0),
@@ -99,7 +95,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
95 style: TextStyle(
96 fontSize: 20.0,
97 fontWeight: FontWeight.bold,
102 - color: Colors.white
98 + color: Theme.of(context).primaryTextTheme.title.color
99 ),
100 ),
101 )
@@ -120,7 +116,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
116 style: TextStyle(
117 fontSize: 12.0,
118 fontWeight: FontWeight.bold,
123 - color: Colors.white
119 + color: Theme.of(context).primaryTextTheme.title.color
120 ),
121 ),
122 )
@@ -136,7 +132,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
132 _fileText,
133 style: TextStyle(
134 fontSize: 12.0,
139 - color: Colors.white
135 + color: Theme.of(context).primaryTextTheme.title.color
136 ),
137 ))
138 ],
@@ -154,7 +150,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
150 style: TextStyle(
151 fontSize: 14.0,
152 fontWeight: FontWeight.bold,
157 - color: Colors.white
153 + color: Theme.of(context).primaryTextTheme.title.color
154 ),
155 ),
156 )
@@ -240,8 +236,8 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
236 decoration: BoxDecoration(
237 gradient: LinearGradient(
238 colors: [
243 - PaletteDark.historyPanel.withOpacity(0.0),
244 - PaletteDark.historyPanel,
239 + Theme.of(context).backgroundColor.withOpacity(0.0),
240 + Theme.of(context).backgroundColor,
241 ],
242 begin: FractionalOffset.topCenter,
243 end: FractionalOffset.bottomCenter,
@@ -279,10 +275,10 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
275 ),
276 decoration: BoxDecoration(
277 border: Border.all(
282 - color: Palette.lightGrey, width: 1.0),
278 + color: Theme.of(context).primaryTextTheme.caption.color, width: 1.0),
279 borderRadius: BorderRadius.all(
280 Radius.circular(8.0)),
285 - color: PaletteDark.historyPanel),
281 + color: Theme.of(context).backgroundColor),
282 child: _checked
283 ? Icon(
284 Icons.check,
@@ -296,7 +292,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
292 style: TextStyle(
293 fontWeight: FontWeight.bold,
294 fontSize: 14.0,
299 - color: Colors.white
295 + color: Theme.of(context).primaryTextTheme.title.color
296 ),
297 )
298 ],
lib/src/screens/exchange/exchange_page.dart
+5 -2
@@ -16,7 +16,10 @@ class ExchangePage extends BasePage {
16 String get title => S.current.exchange;
17
18 @override
19 - Color get backgroundColor => PaletteDark.walletCardSubAddressField;
19 + Color get backgroundLightColor => Palette.darkLavender;
20 +
21 + @override
22 + Color get backgroundDarkColor => PaletteDark.moderateBlue;
23
24 @override
25 Widget middle(BuildContext context) {
@@ -38,7 +41,7 @@ class ExchangePage extends BasePage {
41 child: Text(
42 S.of(context).clear,
43 style: TextStyle(
41 - color: PaletteDark.walletCardText,
44 + color: Theme.of(context).primaryTextTheme.caption.color,
45 fontWeight: FontWeight.w500,
46 fontSize: 14),
47 ),
lib/src/screens/exchange/exchange_template_page.dart
+4 -1
@@ -16,7 +16,10 @@ class ExchangeTemplatePage extends BasePage {
16 String get title => S.current.exchange_new_template;
17
18 @override
19 - Color get backgroundColor => PaletteDark.walletCardSubAddressField;
19 + Color get backgroundLightColor => Palette.darkLavender;
20 +
21 + @override
22 + Color get backgroundDarkColor => PaletteDark.moderateBlue;
23
24 @override
25 Widget trailing(BuildContext context) {
lib/src/screens/exchange/widgets/base_exchange_widget.dart
+21 -22
@@ -6,7 +6,6 @@ import 'package:flutter/cupertino.dart';
6 import 'package:flutter/material.dart';
7 import 'package:flutter_mobx/flutter_mobx.dart';
8 import 'package:mobx/mobx.dart';
9 -import 'package:cake_wallet/palette.dart';
9 import 'package:cake_wallet/routes.dart';
10 import 'package:cake_wallet/generated/i18n.dart';
11 import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
@@ -63,19 +62,18 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
62 final _formKey = GlobalKey<FormState>();
63 var _isReactionsSet = false;
64
66 - final Image arrowBottomPurple = Image.asset(
67 - 'assets/images/arrow_bottom_purple_icon.png',
68 - color: Colors.white,
69 - height: 8,
70 - );
71 - final Image arrowBottomCakeGreen = Image.asset(
72 - 'assets/images/arrow_bottom_cake_green.png',
73 - color: Colors.white,
74 - height: 8,
75 - );
76 -
65 @override
66 Widget build(BuildContext context) {
67 + final Image arrowBottomPurple = Image.asset(
68 + 'assets/images/arrow_bottom_purple_icon.png',
69 + color: Theme.of(context).primaryTextTheme.title.color,
70 + height: 8,
71 + );
72 + final Image arrowBottomCakeGreen = Image.asset(
73 + 'assets/images/arrow_bottom_cake_green.png',
74 + color: Theme.of(context).primaryTextTheme.title.color,
75 + height: 8,
76 + );
77
78 final depositWalletName =
79 exchangeStore.depositCurrency == CryptoCurrency.xmr
@@ -90,7 +88,7 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
88 (_) => _setReactions(context, exchangeStore, walletStore));
89
90 return Container(
93 - color: PaletteDark.historyPanel,
91 + color: Theme.of(context).backgroundColor,
92 child: Form(
93 key: _formKey,
94 child: ScrollableWithBottomSection(
@@ -98,12 +96,12 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
96 content: Column(
97 children: <Widget>[
98 TopPanel(
101 - color: PaletteDark.menuList,
99 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
100 edgeInsets: EdgeInsets.only(bottom: 24),
101 widget: Column(
102 children: <Widget>[
103 TopPanel(
106 - color: PaletteDark.walletCardSubAddressField,
104 + color: Theme.of(context).accentTextTheme.title.color,
105 widget: Observer(
106 builder: (_) => ExchangeCard(
107 key: depositKey,
@@ -121,8 +119,8 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
119 onCurrencySelected: (currency) =>
120 exchangeStore.changeDepositCurrency(currency: currency),
121 imageArrow: arrowBottomPurple,
124 - currencyButtonColor: PaletteDark.walletCardSubAddressField,
125 - addressButtonsColor: PaletteDark.menuList,
122 + currencyButtonColor: Theme.of(context).accentTextTheme.title.color,
123 + addressButtonsColor: Theme.of(context).accentTextTheme.title.backgroundColor,
124 currencyValueValidator: (value) {
125 exchangeStore.validateCryptoCurrency(value);
126 return exchangeStore.errorMessage;
@@ -154,7 +152,8 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
152 onCurrencySelected: (currency) => exchangeStore
153 .changeReceiveCurrency(currency: currency),
154 imageArrow: arrowBottomCakeGreen,
157 - currencyButtonColor: PaletteDark.menuList,
155 + currencyButtonColor: Theme.of(context).accentTextTheme.title.backgroundColor,
156 + addressButtonsColor: Theme.of(context).accentTextTheme.title.color,
157 currencyValueValidator: (value) {
158 exchangeStore.validateCryptoCurrency(value);
159 return exchangeStore.errorMessage;
@@ -185,7 +184,7 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
184 style: TextStyle(
185 fontSize: 18,
186 fontWeight: FontWeight.w600,
188 - color: PaletteDark.walletCardText
187 + color: Theme.of(context).primaryTextTheme.caption.color
188 ),
189 )
190 ],
@@ -215,7 +214,7 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
214 child: DottedBorder(
215 borderType: BorderType.RRect,
216 dashPattern: [8, 4],
218 - color: PaletteDark.menuList,
217 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
218 strokeWidth: 2,
219 radius: Radius.circular(20),
220 child: Container(
@@ -232,7 +231,7 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
231 style: TextStyle(
232 fontSize: 14,
233 fontWeight: FontWeight.w600,
235 - color: PaletteDark.walletCardText
234 + color: Theme.of(context).primaryTextTheme.caption.color
235 ),
236 ),
237 )
@@ -273,7 +272,7 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
272 child: Text(
273 description,
274 style: TextStyle(
276 - color: PaletteDark.walletCardText,
275 + color: Theme.of(context).primaryTextTheme.caption.color,
276 fontSize: 12
277 ),
278 ),
lib/src/screens/exchange/widgets/currency_picker.dart
+6 -6
@@ -26,7 +26,7 @@ class CurrencyPicker extends StatelessWidget {
26 child: BackdropFilter(
27 filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
28 child: Container(
29 - decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
29 + decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)),
30 child: Center(
31 child: Column(
32 mainAxisSize: MainAxisSize.min,
@@ -53,7 +53,7 @@ class CurrencyPicker extends StatelessWidget {
53 child: Container(
54 height: 400,
55 width: 300,
56 - color: PaletteDark.walletCardSubAddressField,
56 + color: Theme.of(context).dividerColor,
57 child: GridView.count(
58 shrinkWrap: true,
59 crossAxisCount: 3,
@@ -65,7 +65,7 @@ class CurrencyPicker extends StatelessWidget {
65
66 if (index == 14) {
67 return Container(
68 - color: PaletteDark.menuList,
68 + color: Theme.of(context).primaryTextTheme.display1.color,
69 );
70 }
71
@@ -73,11 +73,11 @@ class CurrencyPicker extends StatelessWidget {
73 final isItemSelected = index == selectedAtIndex;
74
75 final color = isItemSelected
76 - ? PaletteDark.historyPanel
77 - : PaletteDark.menuList;
76 + ? Theme.of(context).accentTextTheme.subtitle.decorationColor
77 + : Theme.of(context).primaryTextTheme.display1.color;
78 final textColor = isItemSelected
79 ? Colors.blue
80 - : Colors.white;
80 + : Theme.of(context).primaryTextTheme.title.color;
81
82 return GestureDetector(
83 onTap: () {
lib/src/screens/exchange/widgets/exchange_card.dart
+5 -7
@@ -1,6 +1,5 @@
1 import 'package:flutter/services.dart';
2 import 'package:flutter/material.dart';
3 -import 'package:cake_wallet/palette.dart';
3 import 'package:cake_wallet/generated/i18n.dart';
4 import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
5 import 'package:cake_wallet/src/widgets/address_text_field.dart';
@@ -21,7 +20,7 @@ class ExchangeCard extends StatefulWidget {
20 this.onCurrencySelected,
21 this.imageArrow,
22 this.currencyButtonColor = Colors.transparent,
24 - this.addressButtonsColor = PaletteDark.walletCardSubAddressField,
23 + this.addressButtonsColor = Colors.transparent,
24 this.currencyValueValidator,
25 this.addressTextFieldValidator})
26 : super(key: key);
@@ -124,7 +123,7 @@ class ExchangeCardState extends State<ExchangeCard> {
123 style: TextStyle(
124 fontSize: 18,
125 fontWeight: FontWeight.w600,
127 - color: PaletteDark.walletCardText
126 + color: Theme.of(context).primaryTextTheme.caption.color
127 ),
128 )
129 ],
@@ -144,7 +143,6 @@ class ExchangeCardState extends State<ExchangeCard> {
143 RegExp('[\\-|\\ |\\,]'))
144 ],
145 hintText: '0.0000',
147 - borderColor: PaletteDark.borderCardColor,
146 validator: widget.currencyValueValidator
147 ),
148 Positioned(
@@ -165,7 +163,7 @@ class ExchangeCardState extends State<ExchangeCard> {
163 style: TextStyle(
164 fontWeight: FontWeight.w600,
165 fontSize: 16,
168 - color: Colors.white)),
166 + color: Theme.of(context).primaryTextTheme.title.color)),
167 Padding(
168 padding: EdgeInsets.only(left: 5),
169 child: widget.imageArrow,
@@ -189,7 +187,7 @@ class ExchangeCardState extends State<ExchangeCard> {
187 style: TextStyle(
188 fontSize: 10,
189 height: 1.2,
192 - color: PaletteDark.walletCardText),
190 + color: Theme.of(context).primaryTextTheme.caption.color),
191 )
192 : Offstage(),
193 _min != null ? SizedBox(width: 10) : Offstage(),
@@ -200,7 +198,7 @@ class ExchangeCardState extends State<ExchangeCard> {
198 style: TextStyle(
199 fontSize: 10,
200 height: 1.2,
203 - color: PaletteDark.walletCardText))
201 + color: Theme.of(context).primaryTextTheme.caption.color))
202 : Offstage(),
203 ]),
204 ),
lib/src/screens/exchange/widgets/present_provider_picker.dart
+7 -6
@@ -4,7 +4,6 @@ import 'package:cake_wallet/src/domain/exchange/exchange_provider_description.da
4 import 'package:cake_wallet/src/domain/exchange/exchange_provider.dart';
5 import 'package:flutter_mobx/flutter_mobx.dart';
6 import 'package:cake_wallet/generated/i18n.dart';
7 -import 'package:cake_wallet/palette.dart';
7 import 'package:cake_wallet/src/widgets/picker.dart';
8
9 class PresentProviderPicker extends StatelessWidget {
@@ -12,11 +11,13 @@ class PresentProviderPicker extends StatelessWidget {
11
12 final ExchangeStore exchangeStore;
13
15 - final Image arrowBottom =
16 - Image.asset('assets/images/arrow_bottom_purple_icon.png', color: Colors.white, height: 6);
17 -
14 @override
15 Widget build(BuildContext context) {
16 + final Image arrowBottom =
17 + Image.asset('assets/images/arrow_bottom_purple_icon.png',
18 + color: Theme.of(context).primaryTextTheme.title.color,
19 + height: 6);
20 +
21 return FlatButton(
22 onPressed: () => _presentProviderPicker(context),
23 highlightColor: Colors.transparent,
@@ -33,13 +34,13 @@ class PresentProviderPicker extends StatelessWidget {
34 style: TextStyle(
35 fontSize: 16.0,
36 fontWeight: FontWeight.w400,
36 - color: Colors.white)),
37 + color: Theme.of(context).primaryTextTheme.title.color)),
38 Observer(
39 builder: (_) => Text('${exchangeStore.provider.title}',
40 style: TextStyle(
41 fontSize: 10.0,
42 fontWeight: FontWeight.w400,
42 - color:PaletteDark.walletCardText)))
43 + color: Theme.of(context).primaryTextTheme.caption.color)))
44 ],
45 ),
46 SizedBox(width: 5),
lib/src/screens/exchange_trade/exchange_confirm_page.dart
+7 -10
@@ -6,24 +6,21 @@ import 'package:cake_wallet/generated/i18n.dart';
6 import 'package:cake_wallet/src/widgets/primary_button.dart';
7 import 'package:cake_wallet/src/screens/base_page.dart';
8 import 'package:cake_wallet/src/domain/exchange/trade.dart';
9 -import 'package:cake_wallet/palette.dart';
9
10 class ExchangeConfirmPage extends BasePage {
11 ExchangeConfirmPage({@required this.trade});
12
13 final Trade trade;
15 - final copyImage = Image.asset('assets/images/copy_content.png', color: Colors.white);
14
15 @override
16 String get title => S.current.copy_id;
17
20 - @override
21 - Color get backgroundColor => PaletteDark.historyPanel;
22 -
18 @override
19 Widget body(BuildContext context) {
20 + final copyImage = Image.asset('assets/images/copy_content.png',
21 + color: Theme.of(context).primaryTextTheme.title.color);
22 +
23 return Container(
26 - color: PaletteDark.historyPanel,
24 padding: EdgeInsets.all(24),
25 child: Column(
26 children: <Widget>[
@@ -38,7 +35,7 @@ class ExchangeConfirmPage extends BasePage {
35 style: TextStyle(
36 fontSize: 18.0,
37 fontWeight: FontWeight.w600,
41 - color: Colors.white),
38 + color: Theme.of(context).primaryTextTheme.title.color),
39 ),
40 Padding(
41 padding: EdgeInsets.only(top: 60),
@@ -48,7 +45,7 @@ class ExchangeConfirmPage extends BasePage {
45 style: TextStyle(
46 fontSize: 16.0,
47 fontWeight: FontWeight.w600,
51 - color: Colors.white),
48 + color: Theme.of(context).primaryTextTheme.title.color),
49 ),
50 ),
51 Padding(
@@ -72,7 +69,7 @@ class ExchangeConfirmPage extends BasePage {
69 padding: EdgeInsets.only(left: 24, right: 24),
70 decoration: BoxDecoration(
71 borderRadius: BorderRadius.all(Radius.circular(30)),
75 - color: PaletteDark.menuList
72 + color: Theme.of(context).accentTextTheme.title.backgroundColor
73 ),
74 child: Row(
75 mainAxisSize: MainAxisSize.max,
@@ -85,7 +82,7 @@ class ExchangeConfirmPage extends BasePage {
82 style: TextStyle(
83 fontSize: 18,
84 fontWeight: FontWeight.w600,
88 - color: Colors.white
85 + color: Theme.of(context).primaryTextTheme.title.color
86 ),
87 ),
88 ),
lib/src/screens/exchange_trade/exchange_trade_page.dart
+21 -24
@@ -6,7 +6,6 @@ import 'package:flutter_mobx/flutter_mobx.dart';
6 import 'package:flutter/material.dart';
7 import 'package:flutter/cupertino.dart';
8 import 'package:flutter/services.dart';
9 -import 'package:cake_wallet/palette.dart';
9 import 'package:cake_wallet/generated/i18n.dart';
10 import 'package:cake_wallet/src/stores/exchange_trade/exchange_trade_store.dart';
11 import 'package:cake_wallet/src/stores/send/send_store.dart';
@@ -24,9 +23,6 @@ class ExchangeTradePage extends BasePage {
23 @override
24 String get title => S.current.exchange;
25
27 - @override
28 - Color get backgroundColor => PaletteDark.historyPanel;
29 -
26 @override
27 Widget body(BuildContext context) => ExchangeTradeForm();
28 }
@@ -51,7 +47,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
47 _setEffects(context);
48
49 return Container(
54 - color: PaletteDark.historyPanel,
50 child: ScrollableWithBottomSection(
51 contentPadding: EdgeInsets.only(left: 24, right: 24, top: 24),
52 content: Observer(builder: (_) {
@@ -78,14 +73,14 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
73 height: 2,
74 fontWeight: FontWeight.bold,
75 fontSize: 14.0,
81 - color: Colors.white),
76 + color: Theme.of(context).primaryTextTheme.title.color),
77 ),
78 Text(
79 '${trade.id ?? fetchingLabel}',
80 style: TextStyle(
81 fontSize: 14.0,
82 height: 2,
88 - color: PaletteDark.walletCardText),
83 + color: Theme.of(context).primaryTextTheme.caption.color),
84 )
85 ],
86 ),
@@ -98,14 +93,14 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
93 height: 2,
94 fontWeight: FontWeight.bold,
95 fontSize: 14.0,
101 - color: Colors.white),
96 + color: Theme.of(context).primaryTextTheme.title.color),
97 ),
98 Text(
99 '${trade.amount ?? fetchingLabel}',
100 style: TextStyle(
101 fontSize: 14.0,
102 height: 2,
108 - color: PaletteDark.walletCardText),
103 + color: Theme.of(context).primaryTextTheme.caption.color),
104 )
105 ],
106 ),
@@ -119,14 +114,14 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
114 height: 2,
115 fontWeight: FontWeight.bold,
116 fontSize: 14.0,
122 - color: Colors.white),
117 + color: Theme.of(context).primaryTextTheme.title.color),
118 ),
119 Text(
120 '${trade.extraId ?? fetchingLabel}',
121 style: TextStyle(
122 fontSize: 14.0,
123 height: 2,
129 - color: PaletteDark.walletCardText),
124 + color: Theme.of(context).primaryTextTheme.caption.color),
125 )
126 ],
127 )
@@ -139,7 +134,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
134 style: TextStyle(
135 fontSize: 14.0,
136 fontWeight: FontWeight.bold,
142 - color: Colors.white,
137 + color: Theme.of(context).primaryTextTheme.title.color,
138 height: 2),
139 ),
140 Text(
@@ -147,7 +142,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
142 style: TextStyle(
143 fontSize: 14.0,
144 height: 2,
150 - color: PaletteDark.walletCardText),
145 + color: Theme.of(context).primaryTextTheme.caption.color),
146 )
147 ],
148 ),
@@ -159,10 +154,10 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
154 S.of(context).offer_expires_in,
155 style: TextStyle(
156 fontSize: 14.0,
162 - color: Colors.white),
157 + color: Theme.of(context).primaryTextTheme.title.color),
158 ),
159 TimerWidget(trade.expiredAt,
165 - color: PaletteDark.walletCardText)
160 + color: Theme.of(context).primaryTextTheme.caption.color)
161 ],
162 )
163 : Container(),
@@ -186,7 +181,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
181 child: QrImage(
182 data: trade.inputAddress ?? fetchingLabel,
183 backgroundColor: Colors.transparent,
189 - foregroundColor: PaletteDark.walletCardText,
184 + foregroundColor: Theme.of(context).primaryTextTheme.display4.color,
185 ),
186 ),
187 )),
@@ -208,7 +203,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
203 style: TextStyle(
204 fontSize: 14.0,
205 fontWeight: FontWeight.bold,
211 - color: Colors.white),
206 + color: Theme.of(context).primaryTextTheme.title.color),
207 ),
208 ),
209 Container(
@@ -217,7 +212,9 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
212 child: Text(
213 trade.inputAddress ?? fetchingLabel,
214 textAlign: TextAlign.center,
220 - style: TextStyle(fontSize: 14.0, color: PaletteDark.walletCardText),
215 + style: TextStyle(
216 + fontSize: 14.0,
217 + color: Theme.of(context).primaryTextTheme.caption.color),
218 ),
219 ),
220 ),
@@ -242,8 +239,8 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
239 ));
240 },
241 text: S.of(context).copy_address,
245 - color: PaletteDark.menuList,
246 - textColor: Colors.white)
242 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
243 + textColor: Theme.of(context).primaryTextTheme.title.color)
244 ),
245 )),
246 Flexible(
@@ -264,8 +261,8 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
261 ));
262 },
263 text: S.of(context).copy_id,
267 - color: PaletteDark.menuList,
268 - textColor: Colors.white)
264 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
265 + textColor: Theme.of(context).primaryTextTheme.title.color)
266 ),
267 ))
268 ],
@@ -284,7 +281,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
281 textAlign: TextAlign.left,
282 style: TextStyle(
283 fontSize: 13.0,
287 - color: Colors.white),
284 + color: Theme.of(context).primaryTextTheme.title.color),
285 ),
286 ),
287 Text(
@@ -292,7 +289,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
289 textAlign: TextAlign.left,
290 style: TextStyle(
291 fontSize: 13.0,
295 - color: Colors.white),
292 + color: Theme.of(context).primaryTextTheme.title.color),
293 )
294 ],
295 );
lib/src/screens/exchange_trade/widgets/copy_button.dart deleted
-30
@@ -1,30 +0,0 @@
1 -import 'package:flutter/cupertino.dart';
2 -import 'package:flutter/material.dart';
3 -
4 -class CopyButton extends StatelessWidget {
5 - const CopyButton(
6 - {@required this.onPressed,
7 - @required this.text,
8 - @required this.color,
9 - @required this.borderColor});
10 -
11 - final VoidCallback onPressed;
12 - final Color color;
13 - final Color borderColor;
14 - final String text;
15 -
16 - @override
17 - Widget build(BuildContext context) {
18 - return ButtonTheme(
19 - minWidth: double.infinity,
20 - height: 44.0,
21 - child: FlatButton(
22 - onPressed: onPressed,
23 - color: color,
24 - shape: RoundedRectangleBorder(
25 - side: BorderSide(color: borderColor),
26 - borderRadius: BorderRadius.circular(10.0)),
27 - child: Text(text, style: TextStyle(fontSize: 14.0)),
28 - ));
29 - }
30 -}
lib/src/screens/faq/faq_page.dart
+12 -16
@@ -5,15 +5,11 @@ import 'package:provider/provider.dart';
5 import 'package:cake_wallet/generated/i18n.dart';
6 import 'package:cake_wallet/src/stores/settings/settings_store.dart';
7 import 'package:cake_wallet/src/screens/base_page.dart';
8 -import 'package:cake_wallet/palette.dart';
8
9 class FaqPage extends BasePage {
10 @override
11 String get title => S.current.faq;
12
14 - @override
15 - Color get backgroundColor => PaletteDark.historyPanel;
16 -
13 @override
14 Widget body(BuildContext context) => FaqForm();
15 }
@@ -24,25 +20,25 @@ class FaqForm extends StatefulWidget {
20 }
21
22 class FaqFormState extends State<FaqForm> {
27 - final addIcon = Icon(Icons.add, color: Colors.white);
28 - final removeIcon = Icon(Icons.remove, color: Colors.green);
23 List<Icon> icons;
24 List<Color> colors;
25 bool isLoaded = false;
26
27 @override
28 Widget build(BuildContext context) {
29 + final addIcon = Icon(Icons.add, color: Theme.of(context).primaryTextTheme.title.color);
30 + final removeIcon = Icon(Icons.remove, color: Colors.green);
31 +
32 return Container(
36 - color: PaletteDark.historyPanel,
33 padding: EdgeInsets.only(top: 12),
34 child: Container(
39 - color: PaletteDark.menuList,
35 + color: Theme.of(context).accentTextTheme.headline.color,
36 child: FutureBuilder(
37 builder: (context, snapshot) {
38 final faqItems = jsonDecode(snapshot.data.toString()) as List;
39
40 if (snapshot.hasData) {
45 - setIconsAndColors(faqItems.length);
41 + setIconsAndColors(context, faqItems.length, addIcon);
42 }
43
44 return SingleChildScrollView(
@@ -74,7 +70,7 @@ class FaqFormState extends State<FaqForm> {
70 ),
71 ),
72 ),
77 - backgroundColor: PaletteDark.menuHeader,
73 + backgroundColor: Theme.of(context).accentTextTheme.headline.backgroundColor,
74 onExpansionChanged: (value) {
75 setState(() {
76 if (value) {
@@ -82,7 +78,7 @@ class FaqFormState extends State<FaqForm> {
78 colors[index] = Colors.green;
79 } else {
80 icons[index] = addIcon;
85 - colors[index] = Colors.white;
81 + colors[index] = Theme.of(context).primaryTextTheme.title.color;
82 }
83 });
84 },
@@ -101,7 +97,7 @@ class FaqFormState extends State<FaqForm> {
97 itemChild,
98 style: TextStyle(
99 fontSize: 12,
104 - color: Colors.white
100 + color: Theme.of(context).primaryTextTheme.title.color
101 ),
102 ),
103 ))
@@ -111,7 +107,7 @@ class FaqFormState extends State<FaqForm> {
107 );
108 },
109 separatorBuilder: (_, __) =>
114 - Container(color: PaletteDark.mainBackgroundColor, height: 1.0),
110 + Container(color: Theme.of(context).dividerColor, height: 1.0),
111 itemCount: faqItems == null ? 0 : faqItems.length,
112 ),
113 );
@@ -122,13 +118,13 @@ class FaqFormState extends State<FaqForm> {
118 );
119 }
120
125 - void setIconsAndColors(int index) {
121 + void setIconsAndColors(BuildContext context, int index, Icon icon) {
122 if (isLoaded) {
123 return;
124 }
125
130 - icons = List.generate(index, (int i) => addIcon);
131 - colors = List.generate(index, (int i) => Colors.white);
126 + icons = List.generate(index, (int i) => icon);
127 + colors = List.generate(index, (int i) => Theme.of(context).primaryTextTheme.title.color);
128
129 isLoaded = true;
130 }
lib/src/screens/new_wallet/new_wallet_page.dart
+7 -12
@@ -12,7 +12,6 @@ import 'package:cake_wallet/src/domain/services/wallet_service.dart';
12 import 'package:cake_wallet/src/screens/base_page.dart';
13 import 'package:cake_wallet/src/widgets/primary_button.dart';
14 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
15 -import 'package:cake_wallet/palette.dart';
15 import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
16 import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
17 import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
@@ -31,9 +30,6 @@ class NewWalletPage extends BasePage {
30 @override
31 String get title => S.current.new_wallet;
32
34 - @override
35 - Color get backgroundColor => PaletteDark.historyPanel;
36 -
33 @override
34 Widget body(BuildContext context) => WalletNameForm();
35 }
@@ -102,7 +98,6 @@ class _WalletNameFormState extends State<WalletNameForm> {
98 });
99
100 return Container(
105 - color: PaletteDark.historyPanel,
101 padding: EdgeInsets.only(top: 24),
102 child: ScrollableWithBottomSection(
103 contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
@@ -124,21 +119,21 @@ class _WalletNameFormState extends State<WalletNameForm> {
119 style: TextStyle(
120 fontSize: 20.0,
121 fontWeight: FontWeight.w600,
127 - color: Colors.white),
122 + color: Theme.of(context).primaryTextTheme.title.color),
123 controller: nameController,
124 decoration: InputDecoration(
125 hintStyle: TextStyle(
126 fontSize: 16.0,
132 - color: PaletteDark.walletCardText),
127 + color: Theme.of(context).primaryTextTheme.caption.color),
128 hintText: S.of(context).wallet_name,
129 focusedBorder: UnderlineInputBorder(
130 borderSide:
131 BorderSide(
137 - color: PaletteDark.walletCardSubAddressField,
132 + color: Theme.of(context).dividerColor,
133 width: 1.0)),
134 enabledBorder: UnderlineInputBorder(
135 borderSide: BorderSide(
141 - color: PaletteDark.walletCardSubAddressField,
136 + color: Theme.of(context).dividerColor,
137 width: 1.0))),
138 validator: (value) {
139 walletCreationStore.validateWalletName(value);
@@ -153,7 +148,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
148 style: TextStyle(
149 fontSize: 16.0,
150 fontWeight: FontWeight.w600,
156 - color: Colors.white
151 + color: Theme.of(context).primaryTextTheme.title.color
152 ),
153 ),
154 ),
@@ -162,8 +157,8 @@ class _WalletNameFormState extends State<WalletNameForm> {
157 builder: (_) => SelectButton(
158 image: null,
159 text: seedLocales[seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage)],
165 - color: PaletteDark.menuList,
166 - textColor: Colors.white,
160 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
161 + textColor: Theme.of(context).primaryTextTheme.title.color,
162 onTap: () async => await showDialog(
163 context: context,
164 builder: (BuildContext context) => SeedLanguagePicker()
lib/src/screens/new_wallet/new_wallet_type_page.dart
+25 -26
@@ -4,7 +4,6 @@ import 'package:cake_wallet/generated/i18n.dart';
4 import 'package:cake_wallet/src/screens/base_page.dart';
5 import 'package:cake_wallet/src/widgets/primary_button.dart';
6 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
7 -import 'package:cake_wallet/palette.dart';
7 import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
8 import 'package:cake_wallet/routes.dart';
9
@@ -12,9 +11,6 @@ class NewWalletTypePage extends BasePage {
11 @override
12 String get title => S.current.new_wallet;
13
15 - @override
16 - Color get backgroundColor => PaletteDark.historyPanel;
17 -
14 @override
15 Widget body(BuildContext context) => WalletTypeForm();
16 }
@@ -35,10 +31,10 @@ class WalletTypeFormState extends State<WalletTypeForm> {
31 bool isMoneroSelected;
32 bool isBitcoinSelected;
33
38 - Color moneroBackgroundColor;
39 - Color moneroTextColor;
40 - Color bitcoinBackgroundColor;
41 - Color bitcoinTextColor;
34 + Color moneroBackgroundColor = Colors.transparent;
35 + Color moneroTextColor = Colors.transparent;
36 + Color bitcoinBackgroundColor = Colors.transparent;
37 + Color bitcoinTextColor = Colors.transparent;
38
39 @override
40 void initState() {
@@ -46,18 +42,21 @@ class WalletTypeFormState extends State<WalletTypeForm> {
42 isMoneroSelected = false;
43 isBitcoinSelected = false;
44
49 - moneroBackgroundColor = PaletteDark.menuList;
50 - moneroTextColor = Colors.white;
51 - bitcoinBackgroundColor = PaletteDark.menuList;
52 - bitcoinTextColor = Colors.white;
53 -
45 super.initState();
46 + WidgetsBinding.instance.addPostFrameCallback(afterLayout);
47 + }
48 +
49 + void afterLayout(dynamic _) {
50 + moneroBackgroundColor = Theme.of(context).accentTextTheme.title.backgroundColor;
51 + moneroTextColor = Theme.of(context).primaryTextTheme.title.color;
52 + bitcoinBackgroundColor = Theme.of(context).accentTextTheme.title.backgroundColor;
53 + bitcoinTextColor = Theme.of(context).primaryTextTheme.title.color;
54 + setState(() {});
55 }
56
57 @override
58 Widget build(BuildContext context) {
59 return Container(
60 - color: PaletteDark.historyPanel,
60 padding: EdgeInsets.only(top: 24),
61 child: ScrollableWithBottomSection(
62 contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
@@ -78,7 +77,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
77 style: TextStyle(
78 fontSize: 16,
79 fontWeight: FontWeight.w600,
81 - color: Colors.white
80 + color: Theme.of(context).primaryTextTheme.title.color
81 ),
82 ),
83 ),
@@ -98,7 +97,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
97 text: 'Monero',
98 color: moneroBackgroundColor,
99 textColor: moneroTextColor,
101 - onTap: () => onSelectMoneroButton()),
100 + onTap: () => onSelectMoneroButton(context)),
101 )
102 ],
103 ),
@@ -118,28 +117,28 @@ class WalletTypeFormState extends State<WalletTypeForm> {
117 );
118 }
119
121 - void onSelectMoneroButton() {
120 + void onSelectMoneroButton(BuildContext context) {
121 isMoneroSelected = true;
122 isBitcoinSelected = false;
123 isDisabledButton = false;
124
126 - moneroBackgroundColor = Colors.white;
127 - moneroTextColor = PaletteDark.selectButtonText;
128 - bitcoinBackgroundColor = PaletteDark.menuList;
129 - bitcoinTextColor = Colors.white;
125 + moneroBackgroundColor = Theme.of(context).accentTextTheme.title.decorationColor;
126 + moneroTextColor = Theme.of(context).primaryTextTheme.title.backgroundColor;
127 + bitcoinBackgroundColor = Theme.of(context).accentTextTheme.title.backgroundColor;
128 + bitcoinTextColor = Theme.of(context).primaryTextTheme.title.color;
129
130 setState(() {});
131 }
132
134 - void onSelectBitcoinButton() {
133 + void onSelectBitcoinButton(BuildContext context) {
134 isMoneroSelected = false;
135 isBitcoinSelected = true;
136 isDisabledButton = false;
137
139 - moneroBackgroundColor = PaletteDark.menuList;
140 - moneroTextColor = Colors.white;
141 - bitcoinBackgroundColor = Colors.white;
142 - bitcoinTextColor = PaletteDark.selectButtonText;
138 + moneroBackgroundColor = Theme.of(context).accentTextTheme.title.backgroundColor;
139 + moneroTextColor = Theme.of(context).primaryTextTheme.title.color;
140 + bitcoinBackgroundColor = moneroBackgroundColor = Theme.of(context).accentTextTheme.title.decorationColor;
141 + bitcoinTextColor = Theme.of(context).primaryTextTheme.title.backgroundColor;
142
143 setState(() {});
144 }
lib/src/screens/nodes/new_node_page.dart
+16 -21
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
2 import 'package:flutter/cupertino.dart';
3 import 'package:flutter_mobx/flutter_mobx.dart';
4 import 'package:provider/provider.dart';
5 -import 'package:cake_wallet/palette.dart';
5 import 'package:cake_wallet/generated/i18n.dart';
6 import 'package:cake_wallet/src/stores/node_list/node_list_store.dart';
7 import 'package:cake_wallet/src/widgets/primary_button.dart';
@@ -13,9 +12,6 @@ class NewNodePage extends BasePage {
12 @override
13 String get title => S.current.node_new;
14
16 - @override
17 - Color get backgroundColor => PaletteDark.historyPanel;
18 -
15 @override
16 Widget body(BuildContext context) => NewNodePageForm();
17 }
@@ -58,7 +54,6 @@ class NewNodeFormState extends State<NewNodePageForm> {
54 _nodePortController.addListener(() {onHandleControllers(nodeList);});
55
56 return Container(
61 - color: PaletteDark.historyPanel,
57 padding: EdgeInsets.only(left: 24, right: 24),
58 child: ScrollableWithBottomSection(
59 contentPadding: EdgeInsets.only(bottom: 24.0),
@@ -72,22 +67,22 @@ class NewNodeFormState extends State<NewNodePageForm> {
67 child: TextFormField(
68 style: TextStyle(
69 fontSize: 16.0,
75 - color: Colors.white
70 + color: Theme.of(context).primaryTextTheme.title.color
71 ),
72 decoration: InputDecoration(
73 hintStyle:
74 TextStyle(
80 - color: PaletteDark.walletCardText,
75 + color: Theme.of(context).primaryTextTheme.caption.color,
76 fontSize: 16
77 ),
78 hintText: S.of(context).node_address,
79 focusedBorder: UnderlineInputBorder(
80 borderSide: BorderSide(
86 - color: PaletteDark.menuList,
81 + color: Theme.of(context).dividerColor,
82 width: 1.0)),
83 enabledBorder: UnderlineInputBorder(
84 borderSide: BorderSide(
90 - color: PaletteDark.menuList,
85 + color: Theme.of(context).dividerColor,
86 width: 1.0))),
87 controller: _nodeAddressController,
88 validator: (value) {
@@ -105,24 +100,24 @@ class NewNodeFormState extends State<NewNodePageForm> {
100 child: TextFormField(
101 style: TextStyle(
102 fontSize: 16.0,
108 - color: Colors.white
103 + color: Theme.of(context).primaryTextTheme.title.color
104 ),
105 keyboardType: TextInputType.numberWithOptions(
106 signed: false, decimal: false),
107 decoration: InputDecoration(
108 hintStyle:
109 TextStyle(
115 - color: PaletteDark.walletCardText,
110 + color: Theme.of(context).primaryTextTheme.caption.color,
111 fontSize: 16
112 ),
113 hintText: S.of(context).node_port,
114 focusedBorder: UnderlineInputBorder(
115 borderSide: BorderSide(
121 - color: PaletteDark.menuList,
116 + color: Theme.of(context).dividerColor,
117 width: 1.0)),
118 enabledBorder: UnderlineInputBorder(
119 borderSide: BorderSide(
125 - color: PaletteDark.menuList,
120 + color: Theme.of(context).dividerColor,
121 width: 1.0))),
122 controller: _nodePortController,
123 validator: (value) {
@@ -140,22 +135,22 @@ class NewNodeFormState extends State<NewNodePageForm> {
135 child: TextFormField(
136 style: TextStyle(
137 fontSize: 16.0,
143 - color: Colors.white
138 + color: Theme.of(context).primaryTextTheme.title.color
139 ),
140 decoration: InputDecoration(
141 hintStyle:
142 TextStyle(
148 - color: PaletteDark.walletCardText,
143 + color: Theme.of(context).primaryTextTheme.caption.color,
144 fontSize: 16
145 ),
146 hintText: S.of(context).login,
147 focusedBorder: UnderlineInputBorder(
148 borderSide: BorderSide(
154 - color: PaletteDark.menuList,
149 + color: Theme.of(context).dividerColor,
150 width: 1.0)),
151 enabledBorder: UnderlineInputBorder(
152 borderSide: BorderSide(
158 - color: PaletteDark.menuList,
153 + color: Theme.of(context).dividerColor,
154 width: 1.0))),
155 controller: _loginController,
156 validator: (value) => null,
@@ -170,22 +165,22 @@ class NewNodeFormState extends State<NewNodePageForm> {
165 child: TextFormField(
166 style: TextStyle(
167 fontSize: 16.0,
173 - color: Colors.white
168 + color: Theme.of(context).primaryTextTheme.title.color
169 ),
170 decoration: InputDecoration(
171 hintStyle:
172 TextStyle(
178 - color: PaletteDark.walletCardText,
173 + color: Theme.of(context).primaryTextTheme.caption.color,
174 fontSize: 16
175 ),
176 hintText: S.of(context).password,
177 focusedBorder: UnderlineInputBorder(
178 borderSide: BorderSide(
184 - color: PaletteDark.menuList,
179 + color: Theme.of(context).dividerColor,
180 width: 1.0)),
181 enabledBorder: UnderlineInputBorder(
182 borderSide: BorderSide(
188 - color: PaletteDark.menuList,
183 + color: Theme.of(context).dividerColor,
184 width: 1.0))),
185 controller: _passwordController,
186 validator: (value) => null,
lib/src/screens/nodes/nodes_list_page.dart
+11 -13
@@ -18,9 +18,6 @@ class NodeListPage extends BasePage {
18 @override
19 String get title => S.current.nodes;
20
21 - @override
22 - Color get backgroundColor => PaletteDark.historyPanel;
23 -
21 @override
22 Widget trailing(context) {
23 final nodeList = Provider.of<NodeListStore>(context);
@@ -31,7 +28,7 @@ class NodeListPage extends BasePage {
28 width: 72,
29 decoration: BoxDecoration(
30 borderRadius: BorderRadius.all(Radius.circular(16)),
34 - color: PaletteDark.menuList
31 + color: Theme.of(context).accentTextTheme.title.backgroundColor
32 ),
33 child: ButtonTheme(
34 minWidth: double.minPositive,
@@ -82,24 +79,25 @@ class NodeListPageBodyState extends State<NodeListPageBody> {
79
80 final trashImage = Image.asset('assets/images/trash.png', height: 32, width: 32, color: Colors.white);
81
85 - final currentColor = PaletteDark.menuHeader;
86 - final notCurrentColor = PaletteDark.menuList;
82 + final currentColor = Theme.of(context).accentTextTheme.subtitle.decorationColor;
83 + final notCurrentColor = Theme.of(context).accentTextTheme.title.backgroundColor;
84
85 final currentTextColor = Colors.blue;
89 - final notCurrentTextColor = Colors.white;
86 + final notCurrentTextColor = Theme.of(context).primaryTextTheme.title.color;
87
88 return Container(
89 height: double.infinity,
93 - color: PaletteDark.historyPanel,
90 padding: EdgeInsets.only(top: 12),
91 child: Column(
92 mainAxisSize: MainAxisSize.max,
93 children: <Widget>[
94 NodeListRow(
95 title: S.of(context).add_new_node,
100 - trailing: Icon(Icons.add, color: Colors.white, size: 24.0),
101 - color: PaletteDark.menuList,
102 - textColor: Colors.white,
96 + trailing: Icon(Icons.add,
97 + color: Theme.of(context).primaryTextTheme.title.color,
98 + size: 24.0),
99 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
100 + textColor: Theme.of(context).primaryTextTheme.title.color,
101 onTap: () async =>
102 await Navigator.of(context).pushNamed(Routes.newNode),
103 isDrawTop: true,
@@ -112,10 +110,10 @@ class NodeListPageBodyState extends State<NodeListPageBody> {
110 separatorBuilder: (_, __) => Container(
111 height: 1,
112 padding: EdgeInsets.only(left: 24),
115 - color: PaletteDark.menuList,
113 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
114 child: Container(
115 height: 1,
118 - color: PaletteDark.walletCardTopEndSync,
116 + color: Theme.of(context).dividerColor,
117 ),
118 ),
119 itemCount: nodeList.nodes.length,
lib/src/screens/nodes/widgets/node_list_row.dart
+2 -3
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2
3 class NodeListRow extends StatelessWidget {
4 NodeListRow({
@@ -27,7 +26,7 @@ class NodeListRow extends StatelessWidget {
26 ? Container(
27 width: double.infinity,
28 height: 1,
30 - color: PaletteDark.walletCardTopEndSync,
29 + color: Theme.of(context).dividerColor,
30 )
31 : Offstage(),
32 Container(
@@ -54,7 +53,7 @@ class NodeListRow extends StatelessWidget {
53 ? Container(
54 width: double.infinity,
55 height: 1,
57 - color: PaletteDark.walletCardTopEndSync,
56 + color: Theme.of(context).dividerColor,
57 )
58 : Offstage(),
59 ],
lib/src/screens/pin_code/pin_code.dart
+20 -11
@@ -1,7 +1,6 @@
1 import 'package:provider/provider.dart';
2 import 'package:flutter/material.dart';
3 import 'package:flutter/cupertino.dart';
4 -import 'package:cake_wallet/palette.dart';
4 import 'package:cake_wallet/src/stores/settings/settings_store.dart';
5 import 'package:cake_wallet/generated/i18n.dart';
6
@@ -29,8 +28,6 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
28 static const defaultPinLength = 4;
29 static const sixPinLength = 6;
30 static const fourPinLength = 4;
32 - static final deleteIconImage = Image.asset('assets/images/delete_icon.png');
33 - static final faceImage = Image.asset('assets/images/face.png');
31 final _gridViewKey = GlobalKey();
32
33 int pinLength = defaultPinLength;
@@ -89,9 +86,18 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
86 Widget build(BuildContext context) => Scaffold(body: body(context));
87
88 Widget body(BuildContext context) {
89 + final deleteIconImage = Image.asset(
90 + 'assets/images/delete_icon.png',
91 + color: Theme.of(context).primaryTextTheme.title.color,
92 + );
93 + final faceImage = Image.asset(
94 + 'assets/images/face.png',
95 + color: Theme.of(context).primaryTextTheme.title.color,
96 + );
97 +
98 return SafeArea(
99 child: Container(
94 - color: PaletteDark.historyPanel,
100 + color: Theme.of(context).backgroundColor,
101 padding: EdgeInsets.only(left: 40.0, right: 40.0, bottom: 40.0),
102 child: Column(children: <Widget>[
103 Spacer(flex: 2),
@@ -99,7 +105,8 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
105 style: TextStyle(
106 fontSize: 20,
107 fontWeight: FontWeight.bold,
102 - color: Colors.white)),
108 + color: Theme.of(context).primaryTextTheme.title.color
109 + )),
110 Spacer(flex: 3),
111 Container(
112 width: 180,
@@ -114,7 +121,9 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
121 height: size,
122 decoration: BoxDecoration(
123 shape: BoxShape.circle,
117 - color: isFilled ? Colors.white : PaletteDark.walletCardAddressField,
124 + color: isFilled
125 + ? Theme.of(context).primaryTextTheme.title.color
126 + : Theme.of(context).primaryTextTheme.caption.color,
127 ));
128 }),
129 ),
@@ -129,7 +138,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
138 },
139 child: Text(
140 _changePinLengthText(),
132 - style: TextStyle(fontSize: 14.0, color: PaletteDark.walletCardText),
141 + style: TextStyle(fontSize: 14.0, color: Theme.of(context).primaryTextTheme.caption.color),
142 ))
143 ],
144 Spacer(flex: 1),
@@ -153,7 +162,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
162 left: marginLeft, right: marginRight),
163 child: FlatButton(
164 onPressed: () {},
156 - color: PaletteDark.historyPanel,
165 + color: Theme.of(context).backgroundColor,
166 shape: CircleBorder(),
167 child: faceImage,
168 ),
@@ -166,7 +175,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
175 left: marginLeft, right: marginRight),
176 child: FlatButton(
177 onPressed: () => _pop(),
169 - color: PaletteDark.historyPanel,
178 + color: Theme.of(context).backgroundColor,
179 shape: CircleBorder(),
180 child: deleteIconImage,
181 ),
@@ -180,13 +189,13 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
189 left: marginLeft, right: marginRight),
190 child: FlatButton(
191 onPressed: () => _push(index),
183 - color: PaletteDark.historyPanel,
192 + color: Theme.of(context).backgroundColor,
193 shape: CircleBorder(),
194 child: Text('$index',
195 style: TextStyle(
196 fontSize: 30.0,
197 fontWeight: FontWeight.bold,
189 - color: Colors.white)),
198 + color: Theme.of(context).primaryTextTheme.title.color)),
199 ),
200 );
201 }),
lib/src/screens/receive/receive_page.dart
+300 -253
@@ -6,60 +6,28 @@ import 'package:esys_flutter_share/esys_flutter_share.dart';
6 import 'package:flutter_slidable/flutter_slidable.dart';
7 import 'package:provider/provider.dart';
8 import 'package:cake_wallet/routes.dart';
9 -import 'package:cake_wallet/palette.dart';
9 import 'package:cake_wallet/generated/i18n.dart';
10 import 'package:cake_wallet/src/stores/subaddress_list/subaddress_list_store.dart';
11 import 'package:cake_wallet/src/stores/wallet/wallet_store.dart';
12 import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
14 -import 'package:cake_wallet/src/screens/base_page.dart';
13 import 'package:cake_wallet/src/screens/accounts/account_list_page.dart';
14 import 'package:cake_wallet/src/stores/account_list/account_list_store.dart';
15 import 'package:cake_wallet/src/screens/receive/widgets/header_tile.dart';
16 import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
17 +import 'package:cake_wallet/themes.dart';
18 +import 'package:cake_wallet/theme_changer.dart';
19
20 -class ReceivePage extends BasePage {
20 +class ReceivePage extends StatefulWidget {
21 @override
22 - Color get backgroundColor => PaletteDark.mainBackgroundColor;
23 -
24 - @override
25 - bool get resizeToAvoidBottomPadding => false;
26 -
27 - @override
28 - String get title => S.current.receive;
29 -
30 - @override
31 - Widget trailing(BuildContext context) {
32 - final walletStore = Provider.of<WalletStore>(context);
33 - final shareImage = Image.asset('assets/images/share.png');
34 -
35 - return SizedBox(
36 - height: 37.0,
37 - width: 37.0,
38 - child: ButtonTheme(
39 - minWidth: double.minPositive,
40 - child: FlatButton(
41 - highlightColor: Colors.transparent,
42 - splashColor: Colors.transparent,
43 - padding: EdgeInsets.all(0),
44 - onPressed: () => Share.text(
45 - S.current.share_address, walletStore.subaddress.address, 'text/plain'),
46 - child: shareImage),
47 - ),
48 - );
49 - }
50 -
51 - @override
52 - Widget body(BuildContext context) => ReceiveBody();
22 + ReceivePageState createState() => ReceivePageState();
23 }
24
55 -class ReceiveBody extends StatefulWidget {
56 - @override
57 - ReceiveBodyState createState() => ReceiveBodyState();
58 -}
59 -
60 -class ReceiveBodyState extends State<ReceiveBody> {
25 +class ReceivePageState extends State<ReceivePage> {
26 final amountController = TextEditingController();
27 final _formKey = GlobalKey<FormState>();
28 + final _backArrowImage = Image.asset('assets/images/back_arrow.png');
29 + final _backArrowImageDarkTheme =
30 + Image.asset('assets/images/back_arrow_dark_theme.png');
31
32 @override
33 void dispose() {
@@ -73,13 +41,27 @@ class ReceiveBodyState extends State<ReceiveBody> {
41 final subaddressListStore = Provider.of<SubaddressListStore>(context);
42 final accountListStore = Provider.of<AccountListStore>(context);
43
76 - final copyImage = Image.asset('assets/images/copy_content.png');
44 + final shareImage = Image.asset('assets/images/share.png',
45 + color: Theme.of(context).primaryTextTheme.title.color,
46 + );
47 + final copyImage = Image.asset('assets/images/copy_content.png',
48 + color: Theme.of(context).primaryTextTheme.title.color,
49 + );
50
78 - final currentColor = PaletteDark.menuList;
79 - final notCurrentColor = PaletteDark.historyPanel;
51 + final currentColor = Theme.of(context).accentTextTheme.subtitle.decorationColor;
52 + final notCurrentColor = Theme.of(context).backgroundColor;
53
54 final currentTextColor = Colors.blue;
82 - final notCurrentTextColor = PaletteDark.walletCardText;
55 + final notCurrentTextColor = Theme.of(context).primaryTextTheme.caption.color;
56 +
57 + final _themeChanger = Provider.of<ThemeChanger>(context);
58 + Image _backButton;
59 +
60 + if (_themeChanger.getTheme() == Themes.darkTheme) {
61 + _backButton = _backArrowImageDarkTheme;
62 + } else {
63 + _backButton = _backArrowImage;
64 + }
65
66 amountController.addListener(() {
67 if (_formKey.currentState.validate()) {
@@ -89,227 +71,292 @@ class ReceiveBodyState extends State<ReceiveBody> {
71 }
72 });
73
92 - return Container(
93 - height: MediaQuery.of(context).size.height,
94 - width: MediaQuery.of(context).size.width,
95 - color: PaletteDark.mainBackgroundColor,
96 - padding: EdgeInsets.only(top: 24),
97 - child: SingleChildScrollView(
98 - child: Column(
99 - children: <Widget>[
100 - Observer(builder: (_) {
101 - return Row(
102 - children: <Widget>[
103 - Spacer(
104 - flex: 1,
105 - ),
106 - Flexible(
107 - flex: 2,
108 - child: Center(
109 - child: AspectRatio(
110 - aspectRatio: 1.0,
111 - child: QrImage(
112 - data: walletStore.subaddress.address +
113 - walletStore.amountValue,
114 - backgroundColor: Colors.transparent,
115 - foregroundColor: PaletteDark.walletCardText,
116 - ),
117 - ),
118 - )),
119 - Spacer(
120 - flex: 1,
121 - )
122 - ],
123 - );
124 - }),
125 - Padding(
126 - padding: EdgeInsets.all(24),
127 - child: Row(
128 - children: <Widget>[
129 - Expanded(
130 - child: Form(
131 - key: _formKey,
132 - child: BaseTextFormField(
133 - controller: amountController,
134 - keyboardType: TextInputType.numberWithOptions(decimal: true),
135 - inputFormatters: [
136 - BlacklistingTextInputFormatter(
137 - RegExp('[\\-|\\ |\\,]'))
138 - ],
139 - textAlign: TextAlign.center,
140 - hintText: S.of(context).receive_amount,
141 - borderColor: PaletteDark.walletCardText,
142 - validator: (value) {
143 - walletStore.validateAmount(value);
144 - return walletStore.errorMessage;
145 - },
146 - autovalidate: true,
147 - )
148 - )
149 - )
150 - ],
151 - ),
152 - ),
153 - Padding(
154 - padding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
155 - child: Observer(
156 - builder: (_) => GestureDetector(
157 - onTap: () {
158 - Clipboard.setData(ClipboardData(
159 - text: walletStore.subaddress.address));
160 - Scaffold.of(context).showSnackBar(SnackBar(
161 - content: Text(
162 - S.of(context).copied_to_clipboard,
163 - style: TextStyle(color: Colors.white),
164 - ),
165 - backgroundColor: Colors.green,
166 - duration: Duration(milliseconds: 500),
167 - ));
168 - },
169 - child: Container(
170 - height: 48,
171 - padding: EdgeInsets.only(left: 24, right: 24),
172 - decoration: BoxDecoration(
173 - borderRadius: BorderRadius.all(Radius.circular(24)),
174 - color: PaletteDark.walletCardSubAddressField
175 - ),
176 - child: Row(
177 - mainAxisSize: MainAxisSize.max,
178 - children: <Widget>[
179 - Expanded(
180 - child: Text(
181 - walletStore.subaddress.address,
182 - maxLines: 1,
183 - overflow: TextOverflow.ellipsis,
184 - style: TextStyle(
185 - fontSize: 14,
186 - fontWeight: FontWeight.w600,
187 - color: Colors.white
188 - ),
189 - ),
190 - ),
191 - Padding(
192 - padding: EdgeInsets.only(left: 12),
193 - child: copyImage,
194 - )
195 - ],
74 + return Scaffold(
75 + resizeToAvoidBottomPadding: false,
76 + body: Container(
77 + height: MediaQuery.of(context).size.height,
78 + width: MediaQuery.of(context).size.width,
79 + padding: EdgeInsets.only(top: 24),
80 + decoration: BoxDecoration(
81 + gradient: LinearGradient(
82 + colors: [
83 + Theme.of(context).scaffoldBackgroundColor,
84 + Theme.of(context).primaryColor
85 + ],
86 + begin: Alignment.centerLeft,
87 + end: Alignment.centerRight
88 + )
89 + ),
90 + child: Column(
91 + children: <Widget>[
92 + Container(
93 + padding: EdgeInsets.only(
94 + top: 10,
95 + bottom: 20,
96 + left: 5,
97 + right: 10
98 + ),
99 + child: Row(
100 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
101 + crossAxisAlignment: CrossAxisAlignment.center,
102 + children: <Widget>[
103 + SizedBox(
104 + height: 44,
105 + width: 44,
106 + child: ButtonTheme(
107 + minWidth: double.minPositive,
108 + child: FlatButton(
109 + highlightColor: Colors.transparent,
110 + splashColor: Colors.transparent,
111 + padding: EdgeInsets.all(0),
112 + onPressed: () => Navigator.of(context).pop(),
113 + child: _backButton),
114 ),
115 ),
198 - )
199 - ),
200 - ),
201 - Container(
202 - decoration: BoxDecoration(
203 - borderRadius: BorderRadius.only(
204 - topLeft: Radius.circular(24),
205 - topRight: Radius.circular(24),
116 + Text(
117 + S.of(context).receive,
118 + style: TextStyle(
119 + fontSize: 18.0,
120 + fontWeight: FontWeight.bold,
121 + color: Theme.of(context).primaryTextTheme.title.color),
122 + ),
123 + SizedBox(
124 + height: 44.0,
125 + width: 44.0,
126 + child: ButtonTheme(
127 + minWidth: double.minPositive,
128 + child: FlatButton(
129 + highlightColor: Colors.transparent,
130 + splashColor: Colors.transparent,
131 + padding: EdgeInsets.all(0),
132 + onPressed: () => Share.text(
133 + S.current.share_address, walletStore.subaddress.address, 'text/plain'),
134 + child: shareImage),
135 + ),
136 + )
137 + ],
138 ),
207 - color: PaletteDark.historyPanel,
139 ),
209 - child: Observer(
210 - builder: (_) => ListView.separated(
211 - separatorBuilder: (context, index) => Divider(
212 - height: 1,
213 - color: PaletteDark.menuList,
140 + Expanded(
141 + child: SingleChildScrollView(
142 + child: Column(
143 + children: <Widget>[
144 + Observer(builder: (_) {
145 + return Row(
146 + children: <Widget>[
147 + Spacer(
148 + flex: 1,
149 + ),
150 + Flexible(
151 + flex: 2,
152 + child: Center(
153 + child: AspectRatio(
154 + aspectRatio: 1.0,
155 + child: QrImage(
156 + data: walletStore.subaddress.address +
157 + walletStore.amountValue,
158 + backgroundColor: Colors.transparent,
159 + foregroundColor: Theme.of(context).primaryTextTheme.display4.color,
160 + ),
161 + ),
162 + )),
163 + Spacer(
164 + flex: 1,
165 + )
166 + ],
167 + );
168 + }),
169 + Padding(
170 + padding: EdgeInsets.all(24),
171 + child: Row(
172 + children: <Widget>[
173 + Expanded(
174 + child: Form(
175 + key: _formKey,
176 + child: BaseTextFormField(
177 + controller: amountController,
178 + keyboardType: TextInputType.numberWithOptions(decimal: true),
179 + inputFormatters: [
180 + BlacklistingTextInputFormatter(
181 + RegExp('[\\-|\\ |\\,]'))
182 + ],
183 + textAlign: TextAlign.center,
184 + hintText: S.of(context).receive_amount,
185 + borderColor: Theme.of(context).primaryTextTheme.caption.color,
186 + validator: (value) {
187 + walletStore.validateAmount(value);
188 + return walletStore.errorMessage;
189 + },
190 + autovalidate: true,
191 + )
192 + )
193 + )
194 + ],
195 + ),
196 ),
215 - shrinkWrap: true,
216 - physics: NeverScrollableScrollPhysics(),
217 - itemCount: subaddressListStore.subaddresses.length + 2,
218 - itemBuilder: (context, index) {
219 -
220 - if (index == 0) {
221 - return HeaderTile(
222 - onTap: () async {
223 - await showDialog<void>(
224 - context: context,
225 - builder: (BuildContext context) {
226 - return AccountListPage(accountListStore: accountListStore);
227 - }
228 - );
229 - },
230 - title: walletStore.account.label,
231 - icon: Icon(
232 - Icons.arrow_forward_ios,
233 - size: 14,
234 - color: Colors.white,
197 + Padding(
198 + padding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
199 + child: Builder(
200 + builder: (context) => Observer(
201 + builder: (context) => GestureDetector(
202 + onTap: () {
203 + Clipboard.setData(ClipboardData(
204 + text: walletStore.subaddress.address));
205 + Scaffold.of(context).showSnackBar(SnackBar(
206 + content: Text(
207 + S.of(context).copied_to_clipboard,
208 + style: TextStyle(color: Colors.white),
209 + ),
210 + backgroundColor: Colors.green,
211 + duration: Duration(milliseconds: 500),
212 + ));
213 + },
214 + child: Container(
215 + height: 48,
216 + padding: EdgeInsets.only(left: 24, right: 24),
217 + decoration: BoxDecoration(
218 + borderRadius: BorderRadius.all(Radius.circular(24)),
219 + color: Theme.of(context).primaryTextTheme.overline.color
220 + ),
221 + child: Row(
222 + mainAxisSize: MainAxisSize.max,
223 + children: <Widget>[
224 + Expanded(
225 + child: Text(
226 + walletStore.subaddress.address,
227 + maxLines: 1,
228 + overflow: TextOverflow.ellipsis,
229 + style: TextStyle(
230 + fontSize: 14,
231 + fontWeight: FontWeight.w600,
232 + color: Theme.of(context).primaryTextTheme.title.color
233 + ),
234 + ),
235 + ),
236 + Padding(
237 + padding: EdgeInsets.only(left: 12),
238 + child: copyImage,
239 + )
240 + ],
241 + ),
242 + ),
243 )
236 - );
237 - }
244 + )
245 + ),
246 + ),
247 + Observer(
248 + builder: (_) => ListView.separated(
249 + separatorBuilder: (context, index) => Divider(
250 + height: 1,
251 + color: Theme.of(context).dividerColor,
252 + ),
253 + shrinkWrap: true,
254 + physics: NeverScrollableScrollPhysics(),
255 + itemCount: subaddressListStore.subaddresses.length + 2,
256 + itemBuilder: (context, index) {
257
239 - if (index == 1) {
240 - return HeaderTile(
241 - onTap: () => Navigator.of(context)
242 - .pushNamed(Routes.newSubaddress),
243 - title: S.of(context).subaddresses,
244 - icon: Icon(
245 - Icons.add,
246 - size: 20,
247 - color: Colors.white,
248 - )
249 - );
250 - }
258 + if (index == 0) {
259 + return ClipRRect(
260 + borderRadius: BorderRadius.only(
261 + topLeft: Radius.circular(24),
262 + topRight: Radius.circular(24)
263 + ),
264 + child: HeaderTile(
265 + onTap: () async {
266 + await showDialog<void>(
267 + context: context,
268 + builder: (BuildContext context) {
269 + return AccountListPage(accountListStore: accountListStore);
270 + }
271 + );
272 + },
273 + title: walletStore.account.label,
274 + icon: Icon(
275 + Icons.arrow_forward_ios,
276 + size: 14,
277 + color: Theme.of(context).primaryTextTheme.title.color,
278 + )
279 + ),
280 + );
281 + }
282
252 - index -= 2;
283 + if (index == 1) {
284 + return HeaderTile(
285 + onTap: () => Navigator.of(context)
286 + .pushNamed(Routes.newSubaddress),
287 + title: S.of(context).subaddresses,
288 + icon: Icon(
289 + Icons.add,
290 + size: 20,
291 + color: Theme.of(context).primaryTextTheme.title.color,
292 + )
293 + );
294 + }
295
254 - return Observer(
255 - builder: (_) {
256 - final subaddress = subaddressListStore.subaddresses[index];
257 - final isCurrent =
258 - walletStore.subaddress.address == subaddress.address;
296 + index -= 2;
297
260 - final label = subaddress.label.isNotEmpty
261 - ? subaddress.label
262 - : subaddress.address;
298 + return Observer(
299 + builder: (_) {
300 + final subaddress = subaddressListStore.subaddresses[index];
301 + final isCurrent =
302 + walletStore.subaddress.address == subaddress.address;
303
264 - final content = InkWell(
265 - onTap: () => walletStore.setSubaddress(subaddress),
266 - child: Container(
267 - color: isCurrent ? currentColor : notCurrentColor,
268 - padding: EdgeInsets.only(
269 - left: 24,
270 - right: 24,
271 - top: 28,
272 - bottom: 28
273 - ),
274 - child: Text(
275 - label,
276 - style: TextStyle(
277 - fontSize: subaddress.label.isNotEmpty
278 - ? 18 : 10,
279 - fontWeight: FontWeight.bold,
280 - color: isCurrent
281 - ? currentTextColor
282 - : notCurrentTextColor,
283 - ),
284 - ),
285 - ),
286 - );
304 + final label = subaddress.label.isNotEmpty
305 + ? subaddress.label
306 + : subaddress.address;
307
288 - return isCurrent
289 - ? content
290 - : Slidable(
291 - key: Key(subaddress.address),
292 - actionPane: SlidableDrawerActionPane(),
293 - child: content,
294 - secondaryActions: <Widget>[
295 - IconSlideAction(
296 - caption: S.of(context).edit,
297 - color: PaletteDark.walletCardSubAddressField,
298 - icon: Icons.edit,
299 - onTap: () => Navigator.of(context)
300 - .pushNamed(Routes.newSubaddress, arguments: subaddress),
301 - )
302 - ]
303 - );
304 - }
305 - );
306 - }
307 - )
308 - ),
309 - ),
310 - ],
311 - ),
312 - )
308 + final content = InkWell(
309 + onTap: () => walletStore.setSubaddress(subaddress),
310 + child: Container(
311 + color: isCurrent ? currentColor : notCurrentColor,
312 + padding: EdgeInsets.only(
313 + left: 24,
314 + right: 24,
315 + top: 28,
316 + bottom: 28
317 + ),
318 + child: Text(
319 + label,
320 + style: TextStyle(
321 + fontSize: subaddress.label.isNotEmpty
322 + ? 18 : 10,
323 + fontWeight: FontWeight.bold,
324 + color: isCurrent
325 + ? currentTextColor
326 + : notCurrentTextColor,
327 + ),
328 + ),
329 + ),
330 + );
331 +
332 + return isCurrent
333 + ? content
334 + : Slidable(
335 + key: Key(subaddress.address),
336 + actionPane: SlidableDrawerActionPane(),
337 + child: content,
338 + secondaryActions: <Widget>[
339 + IconSlideAction(
340 + caption: S.of(context).edit,
341 + color: Theme.of(context).primaryTextTheme.overline.color,
342 + icon: Icons.edit,
343 + onTap: () => Navigator.of(context)
344 + .pushNamed(Routes.newSubaddress, arguments: subaddress),
345 + )
346 + ]
347 + );
348 + }
349 + );
350 + }
351 + )
352 + ),
353 + ],
354 + ),
355 + )
356 + )
357 + ],
358 + )
359 + ),
360 );
361 }
362 }
\ No newline at end of file
lib/src/screens/receive/widgets/header_tile.dart
+3 -3
@@ -23,7 +23,7 @@ class HeaderTile extends StatelessWidget {
23 top: 24,
24 bottom: 24
25 ),
26 - color: Colors.transparent,
26 + color: Theme.of(context).backgroundColor,
27 child: Row(
28 mainAxisSize: MainAxisSize.max,
29 mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -33,7 +33,7 @@ class HeaderTile extends StatelessWidget {
33 style: TextStyle(
34 fontSize: 18,
35 fontWeight: FontWeight.bold,
36 - color: Colors.white
36 + color: Theme.of(context).primaryTextTheme.title.color
37 ),
38 ),
39 Container(
@@ -41,7 +41,7 @@ class HeaderTile extends StatelessWidget {
41 width: 32,
42 decoration: BoxDecoration(
43 shape: BoxShape.circle,
44 - color: PaletteDark.menuList
44 + color: Theme.of(context).primaryTextTheme.overline.color
45 ),
46 child: icon,
47 )
lib/src/screens/rescan/rescan_page.dart
+3 -4
@@ -17,7 +17,7 @@ class RescanPage extends BasePage {
17 final rescanWalletStore = Provider.of<RescanWalletStore>(context);
18
19 return Padding(
20 - padding: EdgeInsets.only(left: 20, right: 20, bottom: 20),
20 + padding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
21 child:
22 Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
23 BlockchainHeightWidget(key: blockchainKey),
@@ -31,9 +31,8 @@ class RescanPage extends BasePage {
31 restoreHeight: blockchainKey.currentState.height);
32 Navigator.of(context).pop();
33 },
34 - color:
35 - Theme.of(context).primaryTextTheme.button.backgroundColor,
36 - textColor: Theme.of(context).primaryTextTheme.button.color,))
34 + color: Colors.blue,
35 + textColor: Colors.white,))
36 ]),
37 );
38 }
lib/src/screens/restore/restore_options_page.dart
-4
@@ -11,9 +11,6 @@ class RestoreOptionsPage extends BasePage {
11 @override
12 String get title => S.current.restore_restore_wallet;
13
14 - @override
15 - Color get backgroundColor => PaletteDark.historyPanel;
16 -
14 final imageSeedKeys = Image.asset('assets/images/restore_wallet_image.png');
15 final imageBackup = Image.asset('assets/images/backup.png');
16
@@ -23,7 +20,6 @@ class RestoreOptionsPage extends BasePage {
20 width: double.infinity,
21 height: double.infinity,
22 padding: EdgeInsets.all(24),
26 - color: PaletteDark.historyPanel,
23 child: SingleChildScrollView(
24 child: Column(
25 children: <Widget>[
lib/src/screens/restore/restore_wallet_from_keys_page.dart
+16 -21
@@ -14,7 +14,6 @@ import 'package:cake_wallet/src/screens/base_page.dart';
14 import 'package:cake_wallet/src/widgets/primary_button.dart';
15 import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart';
16 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
17 -import 'package:cake_wallet/palette.dart';
17 import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
18 import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
19
@@ -31,9 +30,6 @@ class RestoreWalletFromKeysPage extends BasePage {
30 @override
31 String get title => S.current.restore_title_from_keys;
32
34 - @override
35 - Color get backgroundColor => PaletteDark.historyPanel;
36 -
33 @override
34 Widget body(BuildContext context) => RestoreFromKeysFrom();
35 }
@@ -103,7 +99,6 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
99 });
100
101 return Container(
106 - color: PaletteDark.historyPanel,
102 padding: EdgeInsets.only(left: 24, right: 24),
103 child: ScrollableWithBottomSection(
104 contentPadding: EdgeInsets.only(bottom: 24.0),
@@ -118,22 +113,22 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
113 child: TextFormField(
114 style: TextStyle(
115 fontSize: 16.0,
121 - color: Colors.white
116 + color: Theme.of(context).primaryTextTheme.title.color
117 ),
118 controller: _nameController,
119 decoration: InputDecoration(
120 hintStyle: TextStyle(
126 - color: PaletteDark.walletCardText,
121 + color: Theme.of(context).primaryTextTheme.caption.color,
122 fontSize: 16
123 ),
124 hintText: S.of(context).restore_wallet_name,
125 focusedBorder: UnderlineInputBorder(
126 borderSide: BorderSide(
132 - color: PaletteDark.menuList,
127 + color: Theme.of(context).dividerColor,
128 width: 1.0)),
129 enabledBorder: UnderlineInputBorder(
130 borderSide: BorderSide(
136 - color: PaletteDark.menuList,
131 + color: Theme.of(context).dividerColor,
132 width: 1.0))),
133 validator: (value) {
134 walletRestorationStore.validateWalletName(value);
@@ -151,24 +146,24 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
146 child: TextFormField(
147 style: TextStyle(
148 fontSize: 16.0,
154 - color: Colors.white
149 + color: Theme.of(context).primaryTextTheme.title.color
150 ),
151 controller: _addressController,
152 keyboardType: TextInputType.multiline,
153 maxLines: null,
154 decoration: InputDecoration(
155 hintStyle: TextStyle(
161 - color: PaletteDark.walletCardText,
156 + color: Theme.of(context).primaryTextTheme.caption.color,
157 fontSize: 16
158 ),
159 hintText: S.of(context).restore_address,
160 focusedBorder: UnderlineInputBorder(
161 borderSide: BorderSide(
167 - color: PaletteDark.menuList,
162 + color: Theme.of(context).dividerColor,
163 width: 1.0)),
164 enabledBorder: UnderlineInputBorder(
165 borderSide: BorderSide(
171 - color: PaletteDark.menuList,
166 + color: Theme.of(context).dividerColor,
167 width: 1.0))),
168 validator: (value) {
169 walletRestorationStore.validateAddress(value);
@@ -186,22 +181,22 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
181 child: TextFormField(
182 style: TextStyle(
183 fontSize: 16.0,
189 - color: Colors.white
184 + color: Theme.of(context).primaryTextTheme.title.color
185 ),
186 controller: _viewKeyController,
187 decoration: InputDecoration(
188 hintStyle: TextStyle(
194 - color: PaletteDark.walletCardText,
189 + color: Theme.of(context).primaryTextTheme.caption.color,
190 fontSize: 16
191 ),
192 hintText: S.of(context).restore_view_key_private,
193 focusedBorder: UnderlineInputBorder(
194 borderSide: BorderSide(
200 - color: PaletteDark.menuList,
195 + color: Theme.of(context).dividerColor,
196 width: 1.0)),
197 enabledBorder: UnderlineInputBorder(
198 borderSide: BorderSide(
204 - color: PaletteDark.menuList,
199 + color: Theme.of(context).dividerColor,
200 width: 1.0))),
201 validator: (value) {
202 walletRestorationStore.validateKeys(value);
@@ -219,22 +214,22 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
214 child: TextFormField(
215 style: TextStyle(
216 fontSize: 16.0,
222 - color: Colors.white
217 + color: Theme.of(context).primaryTextTheme.title.color
218 ),
219 controller: _spendKeyController,
220 decoration: InputDecoration(
221 hintStyle: TextStyle(
227 - color: PaletteDark.walletCardText,
222 + color: Theme.of(context).primaryTextTheme.caption.color,
223 fontSize: 16
224 ),
225 hintText: S.of(context).restore_spend_key_private,
226 focusedBorder: UnderlineInputBorder(
227 borderSide: BorderSide(
233 - color: PaletteDark.menuList,
228 + color: Theme.of(context).dividerColor,
229 width: 1.0)),
230 enabledBorder: UnderlineInputBorder(
231 borderSide: BorderSide(
237 - color: PaletteDark.menuList,
232 + color: Theme.of(context).dividerColor,
233 width: 1.0))),
234 validator: (value) {
235 walletRestorationStore.validateKeys(value);
lib/src/screens/restore/restore_wallet_from_seed_details.dart
+4 -9
@@ -10,16 +10,12 @@ import 'package:cake_wallet/src/screens/base_page.dart';
10 import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart';
11 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
12 import 'package:cake_wallet/src/widgets/primary_button.dart';
13 -import 'package:cake_wallet/palette.dart';
13 import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
14
15 class RestoreWalletFromSeedDetailsPage extends BasePage {
16 @override
17 String get title => S.current.restore_wallet_restore_description;
18
20 - @override
21 - Color get backgroundColor => PaletteDark.historyPanel;
22 -
19 @override
20 Widget body(BuildContext context) => RestoreFromSeedDetailsForm();
21 }
@@ -76,7 +72,6 @@ class _RestoreFromSeedDetailsFormState
72 });
73
74 return Container(
79 - color: PaletteDark.historyPanel,
75 padding: EdgeInsets.only(left: 24, right: 24),
76 child: ScrollableWithBottomSection(
77 contentPadding: EdgeInsets.only(bottom: 24.0),
@@ -92,22 +87,22 @@ class _RestoreFromSeedDetailsFormState
87 child: TextFormField(
88 style: TextStyle(
89 fontSize: 16.0,
95 - color: Colors.white
90 + color: Theme.of(context).primaryTextTheme.title.color
91 ),
92 controller: _nameController,
93 decoration: InputDecoration(
94 hintStyle: TextStyle(
100 - color: PaletteDark.walletCardText,
95 + color: Theme.of(context).primaryTextTheme.caption.color,
96 fontSize: 16
97 ),
98 hintText: S.of(context).restore_wallet_name,
99 focusedBorder: UnderlineInputBorder(
100 borderSide: BorderSide(
106 - color: PaletteDark.menuList,
101 + color: Theme.of(context).dividerColor,
102 width: 1.0)),
103 enabledBorder: UnderlineInputBorder(
104 borderSide: BorderSide(
110 - color: PaletteDark.menuList,
105 + color: Theme.of(context).dividerColor,
106 width: 1.0))),
107 validator: (value) {
108 walletRestorationStore
lib/src/screens/restore/restore_wallet_from_seed_page.dart
+5 -2
@@ -28,7 +28,10 @@ class RestoreWalletFromSeedPage extends BasePage {
28 String get title => S.current.restore_title_from_seed;
29
30 @override
31 - Color get backgroundColor => PaletteDark.menuList;
31 + Color get backgroundLightColor => Palette.lavender;
32 +
33 + @override
34 + Color get backgroundDarkColor => PaletteDark.lightNightBlue;
35
36 @override
37 Widget body(BuildContext context) => RestoreFromSeedForm(key: formKey);
@@ -54,7 +57,7 @@ class _RestoreFromSeedFormState extends State<RestoreFromSeedForm> {
57 onTap: () =>
58 SystemChannels.textInput.invokeMethod<void>('TextInput.hide'),
59 child: Container(
57 - color: PaletteDark.historyPanel,
60 + color: Theme.of(context).backgroundColor,
61 child: SeedWidget(
62 key: _seedKey,
63 onMnemoticChange: (seed) => walletRestorationStore.setSeed(seed),
lib/src/screens/restore/restore_wallet_options_page.dart
-4
@@ -13,9 +13,6 @@ class RestoreWalletOptionsPage extends BasePage {
13 @override
14 String get title => S.current.restore_seed_keys_restore;
15
16 - @override
17 - Color get backgroundColor => PaletteDark.historyPanel;
18 -
16 final imageSeed = Image.asset('assets/images/restore_seed.png');
17 final imageKeys = Image.asset('assets/images/restore_keys.png');
18
@@ -27,7 +24,6 @@ class RestoreWalletOptionsPage extends BasePage {
24 width: double.infinity,
25 height: double.infinity,
26 padding: EdgeInsets.all(24),
30 - color: PaletteDark.historyPanel,
27 child: SingleChildScrollView(
28 child: Column(
29 children: <Widget>[
lib/src/screens/restore/widgets/restore_button.dart
+3 -4
@@ -1,6 +1,5 @@
1 import 'package:flutter/cupertino.dart';
2 import 'package:flutter/material.dart';
3 -import 'package:cake_wallet/palette.dart';
3
4 class RestoreButton extends StatelessWidget {
5 const RestoreButton({
@@ -25,7 +24,7 @@ class RestoreButton extends StatelessWidget {
24 alignment: Alignment.topLeft,
25 decoration: BoxDecoration(
26 borderRadius: BorderRadius.all(Radius.circular(12)),
28 - color: PaletteDark.menuList
27 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
28 ),
29 child: Row(
30 mainAxisSize: MainAxisSize.max,
@@ -46,7 +45,7 @@ class RestoreButton extends StatelessWidget {
45 style: TextStyle(
46 fontSize: 16,
47 fontWeight: FontWeight.w600,
49 - color: Colors.white
48 + color: Theme.of(context).primaryTextTheme.title.color
49 ),
50 ),
51 Padding(
@@ -55,7 +54,7 @@ class RestoreButton extends StatelessWidget {
54 description,
55 style: TextStyle(
56 fontSize: 14,
58 - color: PaletteDark.walletCardText
57 + color: Theme.of(context).primaryTextTheme.caption.color
58 ),
59 ),
60 )
lib/src/screens/seed/seed_page.dart
+3 -8
@@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
4 import 'package:flutter/cupertino.dart';
5 import 'package:flutter/services.dart';
6 import 'package:flutter_mobx/flutter_mobx.dart';
7 -import 'package:cake_wallet/palette.dart';
7 import 'package:cake_wallet/generated/i18n.dart';
8 import 'package:cake_wallet/src/widgets/primary_button.dart';
9 import 'package:cake_wallet/src/stores/wallet_seed/wallet_seed_store.dart';
@@ -16,9 +15,6 @@ class SeedPage extends BasePage {
15
16 static final image = Image.asset('assets/images/crypto_lock.png');
17
19 - @override
20 - Color get backgroundColor => PaletteDark.historyPanel;
21 -
18 @override
19 String get title => S.current.seed_title;
20
@@ -44,7 +40,7 @@ class SeedPage extends BasePage {
40 alignment: Alignment.center,
41 decoration: BoxDecoration(
42 borderRadius: BorderRadius.all(Radius.circular(16)),
47 - color: PaletteDark.menuList
43 + color: Theme.of(context).accentTextTheme.title.color
44 ),
45 child: Text(
46 S.of(context).seed_language_next,
@@ -67,7 +63,6 @@ class SeedPage extends BasePage {
63 return Container(
64 width: double.infinity,
65 height: double.infinity,
70 - color: PaletteDark.historyPanel,
66 child: ScrollableWithBottomSection(
67 contentPadding: EdgeInsets.only(left: 40, right: 40, bottom: 20),
68 content: Column(
@@ -90,7 +85,7 @@ class SeedPage extends BasePage {
85 style: TextStyle(
86 fontSize: 20,
87 fontWeight: FontWeight.bold,
93 - color: Colors.white
88 + color: Theme.of(context).primaryTextTheme.title.color
89 ),
90 ),
91 Padding(
@@ -100,7 +95,7 @@ class SeedPage extends BasePage {
95 textAlign: TextAlign.center,
96 style: TextStyle(
97 fontSize: 14,
103 - color: PaletteDark.walletCardText
98 + color: Theme.of(context).primaryTextTheme.caption.color
99 ),
100 ),
101 )
lib/src/screens/seed_language/seed_language_page.dart
+3 -8
@@ -6,15 +6,11 @@ import 'package:cake_wallet/generated/i18n.dart';
6 import 'package:cake_wallet/src/screens/base_page.dart';
7 import 'package:cake_wallet/src/widgets/primary_button.dart';
8 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
9 -import 'package:cake_wallet/palette.dart';
9 import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
10 import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
11 import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
12
13 class SeedLanguage extends BasePage {
15 - @override
16 - Color get backgroundColor => PaletteDark.historyPanel;
17 -
14 @override
15 Widget body(BuildContext context) => SeedLanguageForm();
16 }
@@ -44,7 +40,6 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
40 ];
41
42 return Container(
47 - color: PaletteDark.historyPanel,
43 padding: EdgeInsets.only(top: 24),
44 child: ScrollableWithBottomSection(
45 contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
@@ -64,7 +59,7 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
59 style: TextStyle(
60 fontSize: 16.0,
61 fontWeight: FontWeight.w600,
67 - color: Colors.white
62 + color: Theme.of(context).primaryTextTheme.title.color
63 ),
64 ),
65 ),
@@ -73,8 +68,8 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
68 builder: (_) => SelectButton(
69 image: null,
70 text: seedLocales[seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage)],
76 - color: PaletteDark.menuList,
77 - textColor: Colors.white,
71 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
72 + textColor: Theme.of(context).primaryTextTheme.title.color,
73 onTap: () async => await showDialog(
74 context: context,
75 builder: (BuildContext context) => SeedLanguagePicker()
lib/src/screens/seed_language/widgets/seed_language_picker.dart
+8 -4
@@ -48,7 +48,7 @@ class SeedLanguagePickerState extends State<SeedLanguagePicker> {
48 child: BackdropFilter(
49 filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
50 child: Container(
51 - decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
51 + decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)),
52 child: Center(
53 child: Column(
54 mainAxisSize: MainAxisSize.min,
@@ -75,7 +75,7 @@ class SeedLanguagePickerState extends State<SeedLanguagePicker> {
75 width: 300,
76 decoration: BoxDecoration(
77 borderRadius: BorderRadius.all(Radius.circular(14)),
78 - color: PaletteDark.walletCardSubAddressField
78 + color: Theme.of(context).dividerColor
79 ),
80 child: GridView.count(
81 shrinkWrap: true,
@@ -173,8 +173,12 @@ class SeedLanguagePickerState extends State<SeedLanguagePicker> {
173 @required VoidCallback onTap}) {
174
175 BorderRadius borderRadius;
176 - final color = isCurrent ? PaletteDark.historyPanel : PaletteDark.menuList;
177 - final textColor = isCurrent ? Colors.blue : Colors.white;
176 + final color = isCurrent
177 + ? Theme.of(context).accentTextTheme.subtitle.decorationColor
178 + : Theme.of(context).primaryTextTheme.display1.color;
179 + final textColor = isCurrent
180 + ? Colors.blue
181 + : Theme.of(context).primaryTextTheme.title.color;
182
183 switch (place) {
184 case Places.topLeft:
lib/src/screens/send/send_page.dart
+26 -22
@@ -35,7 +35,10 @@ class SendPage extends BasePage {
35 String get title => S.current.send_title;
36
37 @override
38 - Color get backgroundColor => PaletteDark.menuList;
38 + Color get backgroundLightColor => Palette.lavender;
39 +
40 + @override
41 + Color get backgroundDarkColor => PaletteDark.lightNightBlue;
42
43 @override
44 bool get resizeToAvoidBottomPadding => false;
@@ -49,7 +52,7 @@ class SendPage extends BasePage {
52 width: 82,
53 decoration: BoxDecoration(
54 borderRadius: BorderRadius.all(Radius.circular(16)),
52 - color: PaletteDark.menuHeader
55 + color: Theme.of(context).accentTextTheme.title.color
56 ),
57 child: ButtonTheme(
58 minWidth: double.minPositive,
@@ -130,13 +133,13 @@ class SendFormState extends State<SendForm> {
133 _setEffects(context);
134
135 return Container(
133 - color: PaletteDark.historyPanel,
136 + color: Theme.of(context).backgroundColor,
137 child: ScrollableWithBottomSection(
138 contentPadding: EdgeInsets.only(bottom: 24),
139 content: Column(
140 children: <Widget>[
141 TopPanel(
139 - color: PaletteDark.menuList,
142 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
143 widget: Form(
144 key: _formKey,
145 child: Column(children: <Widget>[
@@ -162,6 +165,7 @@ class SendFormState extends State<SendForm> {
165 AddressTextFieldOption.qrCode,
166 AddressTextFieldOption.addressBook
167 ],
168 + buttonColor: Theme.of(context).accentTextTheme.title.color,
169 validator: (value) {
170 sendStore.validateAddress(value,
171 cryptoCurrency: CryptoCurrency.xmr);
@@ -175,7 +179,7 @@ class SendFormState extends State<SendForm> {
179 child: TextFormField(
180 style: TextStyle(
181 fontSize: 16.0,
178 - color: Colors.white
182 + color: Theme.of(context).primaryTextTheme.title.color
183 ),
184 controller: _cryptoAmountController,
185 keyboardType: TextInputType.numberWithOptions(
@@ -191,7 +195,7 @@ class SendFormState extends State<SendForm> {
195 style: TextStyle(
196 fontSize: 16,
197 fontWeight: FontWeight.bold,
194 - color: Colors.white,
198 + color: Theme.of(context).primaryTextTheme.title.color,
199 )),
200 ),
201 suffixIcon: Padding(
@@ -211,7 +215,7 @@ class SendFormState extends State<SendForm> {
215 overflow: TextOverflow.ellipsis,
216 style: TextStyle(
217 fontSize: 16,
214 - color: PaletteDark.walletCardText
218 + color: Theme.of(context).primaryTextTheme.caption.color
219 )
220 ),
221 ),
@@ -220,7 +224,7 @@ class SendFormState extends State<SendForm> {
224 width: 32,
225 margin: EdgeInsets.only(left: 12, bottom: 7, top: 4),
226 decoration: BoxDecoration(
223 - color: PaletteDark.walletCardSubAddressField,
227 + color: Theme.of(context).accentTextTheme.title.color,
228 borderRadius: BorderRadius.all(Radius.circular(6))
229 ),
230 child: InkWell(
@@ -231,7 +235,7 @@ class SendFormState extends State<SendForm> {
235 style: TextStyle(
236 fontSize: 9,
237 fontWeight: FontWeight.bold,
234 - color: PaletteDark.walletCardText
238 + color: Theme.of(context).primaryTextTheme.caption.color
239 )
240 ),
241 ),
@@ -242,15 +246,15 @@ class SendFormState extends State<SendForm> {
246 ),
247 hintStyle: TextStyle(
248 fontSize: 16.0,
245 - color: Colors.white),
249 + color: Theme.of(context).primaryTextTheme.title.color),
250 hintText: '0.0000',
251 focusedBorder: UnderlineInputBorder(
252 borderSide: BorderSide(
249 - color: PaletteDark.walletCardSubAddressField,
253 + color: Theme.of(context).dividerColor,
254 width: 1.0)),
255 enabledBorder: UnderlineInputBorder(
256 borderSide: BorderSide(
253 - color: PaletteDark.walletCardSubAddressField,
257 + color: Theme.of(context).dividerColor,
258 width: 1.0))),
259 validator: (value) {
260 sendStore.validateXMR(
@@ -265,7 +269,7 @@ class SendFormState extends State<SendForm> {
269 child: TextFormField(
270 style: TextStyle(
271 fontSize: 16.0,
268 - color: Colors.white),
272 + color: Theme.of(context).primaryTextTheme.title.color),
273 controller: _fiatAmountController,
274 keyboardType: TextInputType.numberWithOptions(
275 signed: false, decimal: true),
@@ -281,20 +285,20 @@ class SendFormState extends State<SendForm> {
285 style: TextStyle(
286 fontSize: 16,
287 fontWeight: FontWeight.bold,
284 - color: Colors.white,
288 + color: Theme.of(context).primaryTextTheme.title.color,
289 )),
290 ),
291 hintStyle: TextStyle(
292 fontSize: 16.0,
289 - color: PaletteDark.walletCardText),
293 + color: Theme.of(context).primaryTextTheme.caption.color),
294 hintText: '0.00',
295 focusedBorder: UnderlineInputBorder(
296 borderSide: BorderSide(
293 - color: PaletteDark.walletCardSubAddressField,
297 + color: Theme.of(context).dividerColor,
298 width: 1.0)),
299 enabledBorder: UnderlineInputBorder(
300 borderSide: BorderSide(
297 - color: PaletteDark.walletCardSubAddressField,
301 + color: Theme.of(context).dividerColor,
302 width: 1.0)))),
303 ),
304 Padding(
@@ -306,14 +310,14 @@ class SendFormState extends State<SendForm> {
310 style: TextStyle(
311 fontSize: 12,
312 fontWeight: FontWeight.w600,
309 - color: Colors.white,
313 + color: Theme.of(context).primaryTextTheme.title.color,
314 )),
315 Text(
316 '${calculateEstimatedFee(priority: settingsStore.transactionPriority)} XMR',
317 style: TextStyle(
318 fontSize: 12,
319 fontWeight: FontWeight.w600,
316 - color: Colors.white,
320 + color: Theme.of(context).primaryTextTheme.title.color,
321 ))
322 ],
323 ),
@@ -335,7 +339,7 @@ class SendFormState extends State<SendForm> {
339 style: TextStyle(
340 fontSize: 18,
341 fontWeight: FontWeight.w600,
338 - color: PaletteDark.walletCardText
342 + color: Theme.of(context).primaryTextTheme.caption.color
343 ),
344 )
345 ],
@@ -363,7 +367,7 @@ class SendFormState extends State<SendForm> {
367 child: DottedBorder(
368 borderType: BorderType.RRect,
369 dashPattern: [8, 4],
366 - color: PaletteDark.menuList,
370 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
371 strokeWidth: 2,
372 radius: Radius.circular(20),
373 child: Container(
@@ -380,7 +384,7 @@ class SendFormState extends State<SendForm> {
384 style: TextStyle(
385 fontSize: 14,
386 fontWeight: FontWeight.w600,
383 - color: PaletteDark.walletCardText
387 + color: Theme.of(context).primaryTextTheme.caption.color
388 ),
389 ),
390 )
lib/src/screens/send/send_template_page.dart
+21 -17
@@ -21,7 +21,10 @@ class SendTemplatePage extends BasePage {
21 String get title => S.current.send_title;
22
23 @override
24 - Color get backgroundColor => PaletteDark.menuList;
24 + Color get backgroundLightColor => Palette.lavender;
25 +
26 + @override
27 + Color get backgroundDarkColor => PaletteDark.lightNightBlue;
28
29 @override
30 bool get resizeToAvoidBottomPadding => false;
@@ -65,33 +68,33 @@ class SendTemplateFormState extends State<SendTemplateForm> {
68 _setEffects(context);
69
70 return Container(
68 - color: PaletteDark.historyPanel,
71 + color: Theme.of(context).backgroundColor,
72 child: ScrollableWithBottomSection(
73 contentPadding: EdgeInsets.only(bottom: 24),
74 content: Column(
75 children: <Widget>[
76 TopPanel(
74 - color: PaletteDark.menuList,
77 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
78 widget: Form(
79 key: _formKey,
80 child: Column(children: <Widget>[
81 TextFormField(
82 style: TextStyle(
83 fontSize: 16.0,
81 - color: Colors.white),
84 + color: Theme.of(context).primaryTextTheme.title.color),
85 controller: _nameController,
86 decoration: InputDecoration(
87 hintStyle: TextStyle(
88 fontSize: 16.0,
86 - color: PaletteDark.walletCardText),
89 + color: Theme.of(context).primaryTextTheme.caption.color),
90 hintText: S.of(context).send_name,
91 focusedBorder: UnderlineInputBorder(
92 borderSide: BorderSide(
90 - color: PaletteDark.walletCardSubAddressField,
93 + color: Theme.of(context).dividerColor,
94 width: 1.0)),
95 enabledBorder: UnderlineInputBorder(
96 borderSide: BorderSide(
94 - color: PaletteDark.walletCardSubAddressField,
97 + color: Theme.of(context).dividerColor,
98 width: 1.0))),
99 validator: (value) {
100 sendTemplateStore.validateTemplate(value);
@@ -121,6 +124,7 @@ class SendTemplateFormState extends State<SendTemplateForm> {
124 AddressTextFieldOption.qrCode,
125 AddressTextFieldOption.addressBook
126 ],
127 + buttonColor: Theme.of(context).accentTextTheme.title.color,
128 validator: (value) {
129 sendTemplateStore.validateTemplate(value);
130 return sendTemplateStore.errorMessage;
@@ -134,7 +138,7 @@ class SendTemplateFormState extends State<SendTemplateForm> {
138 child: TextFormField(
139 style: TextStyle(
140 fontSize: 16.0,
137 - color: Colors.white
141 + color: Theme.of(context).primaryTextTheme.title.color
142 ),
143 controller: _cryptoAmountController,
144 keyboardType: TextInputType.numberWithOptions(
@@ -150,20 +154,20 @@ class SendTemplateFormState extends State<SendTemplateForm> {
154 style: TextStyle(
155 fontSize: 16,
156 fontWeight: FontWeight.bold,
153 - color: Colors.white,
157 + color: Theme.of(context).primaryTextTheme.title.color,
158 )),
159 ),
160 hintStyle: TextStyle(
161 fontSize: 16.0,
158 - color: Colors.white),
162 + color: Theme.of(context).primaryTextTheme.title.color),
163 hintText: '0.0000',
164 focusedBorder: UnderlineInputBorder(
165 borderSide: BorderSide(
162 - color: PaletteDark.walletCardSubAddressField,
166 + color: Theme.of(context).dividerColor,
167 width: 1.0)),
168 enabledBorder: UnderlineInputBorder(
169 borderSide: BorderSide(
166 - color: PaletteDark.walletCardSubAddressField,
170 + color: Theme.of(context).dividerColor,
171 width: 1.0))),
172 ),
173 );
@@ -174,7 +178,7 @@ class SendTemplateFormState extends State<SendTemplateForm> {
178 child: TextFormField(
179 style: TextStyle(
180 fontSize: 16.0,
177 - color: Colors.white),
181 + color: Theme.of(context).primaryTextTheme.title.color),
182 controller: _fiatAmountController,
183 keyboardType: TextInputType.numberWithOptions(
184 signed: false, decimal: true),
@@ -190,20 +194,20 @@ class SendTemplateFormState extends State<SendTemplateForm> {
194 style: TextStyle(
195 fontSize: 16,
196 fontWeight: FontWeight.bold,
193 - color: Colors.white,
197 + color: Theme.of(context).primaryTextTheme.title.color,
198 )),
199 ),
200 hintStyle: TextStyle(
201 fontSize: 16.0,
198 - color: PaletteDark.walletCardText),
202 + color: Theme.of(context).primaryTextTheme.caption.color),
203 hintText: '0.00',
204 focusedBorder: UnderlineInputBorder(
205 borderSide: BorderSide(
202 - color: PaletteDark.walletCardSubAddressField,
206 + color: Theme.of(context).dividerColor,
207 width: 1.0)),
208 enabledBorder: UnderlineInputBorder(
209 borderSide: BorderSide(
206 - color: PaletteDark.walletCardSubAddressField,
210 + color: Theme.of(context).dividerColor,
211 width: 1.0)))),
212 ),
213 ]),
lib/src/screens/send/widgets/sending_alert.dart
+5 -6
@@ -1,5 +1,4 @@
1 import 'dart:ui';
2 -import 'package:cake_wallet/palette.dart';
2 import 'package:cake_wallet/src/stores/send/sending_state.dart';
3 import 'package:flutter/material.dart';
4 import 'package:cake_wallet/src/widgets/primary_button.dart';
@@ -31,7 +30,7 @@ class SendingAlertState extends State<SendingAlert> {
30 return Stack(
31 children: <Widget>[
32 Container(
34 - color: PaletteDark.historyPanel,
33 + color: Theme.of(context).backgroundColor,
34 child: Center(
35 child: Image.asset(
36 'assets/images/birthday_cake.png'),
@@ -46,7 +45,7 @@ class SendingAlertState extends State<SendingAlert> {
45 style: TextStyle(
46 fontSize: 22,
47 fontWeight: FontWeight.bold,
49 - color: Colors.white,
48 + color: Theme.of(context).primaryTextTheme.title.color,
49 decoration: TextDecoration.none,
50 ),
51 ),
@@ -70,7 +69,7 @@ class SendingAlertState extends State<SendingAlert> {
69 return Stack(
70 children: <Widget>[
71 Container(
73 - color: PaletteDark.historyPanel,
72 + color: Theme.of(context).backgroundColor,
73 child: Center(
74 child: Image.asset(
75 'assets/images/birthday_cake.png'),
@@ -79,7 +78,7 @@ class SendingAlertState extends State<SendingAlert> {
78 BackdropFilter(
79 filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
80 child: Container(
82 - decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.25)),
81 + decoration: BoxDecoration(color: Theme.of(context).backgroundColor.withOpacity(0.25)),
82 child: Center(
83 child: Padding(
84 padding: EdgeInsets.only(top: 220),
@@ -89,7 +88,7 @@ class SendingAlertState extends State<SendingAlert> {
88 style: TextStyle(
89 fontSize: 22,
90 fontWeight: FontWeight.bold,
92 - color: Colors.white,
91 + color: Theme.of(context).primaryTextTheme.title.color,
92 decoration: TextDecoration.none,
93 ),
94 ),
lib/src/screens/settings/change_language.dart
+5 -10
@@ -5,41 +5,36 @@ import 'package:cake_wallet/generated/i18n.dart';
5 import 'package:cake_wallet/src/domain/common/language.dart';
6 import 'package:cake_wallet/src/stores/settings/settings_store.dart';
7 import 'package:cake_wallet/src/screens/base_page.dart';
8 -import 'package:cake_wallet/palette.dart';
8 import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
9
10 class ChangeLanguage extends BasePage {
11 @override
12 String get title => S.current.settings_change_language;
13
15 - @override
16 - Color get backgroundColor => PaletteDark.historyPanel;
17 -
14 @override
15 Widget body(BuildContext context) {
16 final settingsStore = Provider.of<SettingsStore>(context);
17 final currentLanguage = Provider.of<Language>(context);
18
19 final currentColor = Colors.green;
24 - final notCurrentColor = Colors.white;
20 + final notCurrentColor = Theme.of(context).primaryTextTheme.title.color;
21
22 final shortDivider = Container(
23 height: 1,
24 padding: EdgeInsets.only(left: 24),
29 - color: PaletteDark.menuList,
25 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
26 child: Container(
27 height: 1,
32 - color: PaletteDark.mainBackgroundColor,
28 + color: Theme.of(context).dividerColor,
29 ),
30 );
31
32 final longDivider = Container(
33 height: 1,
38 - color: PaletteDark.mainBackgroundColor,
34 + color: Theme.of(context).dividerColor,
35 );
36
37 return Container(
42 - color: PaletteDark.historyPanel,
38 padding: EdgeInsets.only(top: 10.0),
39 child: ListView.builder(
40 itemCount: languages.values.length,
@@ -56,7 +51,7 @@ class ChangeLanguage extends BasePage {
51 index == 0 ? longDivider : Offstage(),
52 Container(
53 padding: EdgeInsets.only(top: 4, bottom: 4),
59 - color: PaletteDark.menuList,
54 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
55 child: ListTile(
56 contentPadding: EdgeInsets.only(left: 24, right: 24),
57 title: Text(
lib/src/screens/settings/enter_pin_code.dart deleted
-236
@@ -1,236 +0,0 @@
1 -import 'package:flutter/material.dart';
2 -import 'package:flutter/cupertino.dart';
3 -import 'package:cake_wallet/palette.dart';
4 -import 'package:flutter/foundation.dart';
5 -import 'package:provider/provider.dart';
6 -import 'package:cake_wallet/theme_changer.dart';
7 -import 'package:cake_wallet/themes.dart';
8 -import 'package:cake_wallet/generated/i18n.dart';
9 -
10 -class EnterPinCode extends StatefulWidget {
11 - const EnterPinCode(this.currentPinLength, this.currentPin);
12 -
13 - final int currentPinLength;
14 - final List<int> currentPin;
15 -
16 - @override
17 - EnterPinCodeState createState() =>
18 - EnterPinCodeState(currentPinLength, currentPin);
19 -}
20 -
21 -class EnterPinCodeState extends State<EnterPinCode> {
22 - EnterPinCodeState(this.pinLength, this.currentPin);
23 -
24 - final _gridViewKey = GlobalKey();
25 - final _closeButtonImage = Image.asset('assets/images/close_button.png');
26 - final _closeButtonImageDarkTheme =
27 - Image.asset('assets/images/close_button_dark_theme.png');
28 - static final deleteIconImage = Image.asset('assets/images/delete_icon.png');
29 - final int pinLength;
30 - final List<int> currentPin;
31 - List<int> pin;
32 - double _aspectRatio = 0;
33 -
34 - void _calcualteCurrentAspectRatio() {
35 - final renderBox =
36 - _gridViewKey.currentContext.findRenderObject() as RenderBox;
37 - final cellWidth = renderBox.size.width / 3;
38 - final cellHeight = renderBox.size.height / 4;
39 -
40 - if (cellWidth > 0 && cellHeight > 0) {
41 - _aspectRatio = cellWidth / cellHeight;
42 - }
43 -
44 - setState(() {});
45 - }
46 -
47 - @override
48 - void initState() {
49 - super.initState();
50 - pin = List<int>.filled(pinLength, null);
51 - WidgetsBinding.instance.addPostFrameCallback(_afterLayout);
52 - }
53 -
54 - void _afterLayout(dynamic _) => _calcualteCurrentAspectRatio();
55 -
56 - @override
57 - Widget build(BuildContext context) {
58 - final _themeChanger = Provider.of<ThemeChanger>(context);
59 - final _isDarkTheme = _themeChanger.getTheme() == Themes.darkTheme;
60 -
61 - return Scaffold(
62 - backgroundColor: Theme.of(context).backgroundColor,
63 - appBar: CupertinoNavigationBar(
64 - leading: ButtonTheme(
65 - minWidth: double.minPositive,
66 - child: FlatButton(
67 - onPressed: () {
68 - Navigator.pop(context, false);
69 - },
70 - child: _isDarkTheme
71 - ? _closeButtonImageDarkTheme
72 - : _closeButtonImage),
73 - ),
74 - backgroundColor: Theme.of(context).backgroundColor,
75 - border: null),
76 - body: SafeArea(
77 - child: Container(
78 - padding: EdgeInsets.only(left: 40.0, right: 40.0, bottom: 40.0),
79 - child: Column(
80 - children: <Widget>[
81 - Spacer(flex: 2),
82 - Text(S.of(context).enter_your_pin,
83 - style: TextStyle(fontSize: 24, color: Palette.wildDarkBlue)),
84 - Spacer(flex: 3),
85 - Container(
86 - width: 180,
87 - child: Row(
88 - mainAxisAlignment: MainAxisAlignment.spaceBetween,
89 - children: List.generate(pinLength, (index) {
90 - const size = 10.0;
91 - final isFilled = pin[index] != null;
92 -
93 - return Container(
94 - width: size,
95 - height: size,
96 - decoration: BoxDecoration(
97 - shape: BoxShape.circle,
98 - color:
99 - isFilled ? Palette.deepPurple : Colors.transparent,
100 - border: Border.all(color: Palette.wildDarkBlue),
101 - ));
102 - }),
103 - ),
104 - ),
105 - Spacer(flex: 3),
106 - Flexible(
107 - flex: 24,
108 - child: Container(
109 - key: _gridViewKey,
110 - child: _aspectRatio > 0
111 - ? GridView.count(
112 - crossAxisCount: 3,
113 - childAspectRatio: _aspectRatio,
114 - physics: const NeverScrollableScrollPhysics(),
115 - children: List.generate(12, (index) {
116 - if (index == 9) {
117 - return Container(
118 - margin: EdgeInsets.all(5.0),
119 - decoration: BoxDecoration(
120 - shape: BoxShape.circle,
121 - color: _isDarkTheme
122 - ? PaletteDark.darkThemePinButton
123 - : Palette.darkGrey,
124 - ),
125 - );
126 - } else if (index == 10) {
127 - index = 0;
128 - } else if (index == 11) {
129 - return Container(
130 - margin: EdgeInsets.all(5.0),
131 - child: FlatButton(
132 - onPressed: () {
133 - _pop();
134 - },
135 - color: _isDarkTheme
136 - ? PaletteDark.darkThemePinButton
137 - : Palette.darkGrey,
138 - shape: CircleBorder(),
139 - child: deleteIconImage,
140 - ),
141 - );
142 - } else {
143 - index++;
144 - }
145 -
146 - return Container(
147 - margin: EdgeInsets.all(5.0),
148 - child: FlatButton(
149 - onPressed: () {
150 - _push(index);
151 - },
152 - color: _isDarkTheme
153 - ? PaletteDark.darkThemePinDigitButton
154 - : Palette.creamyGrey,
155 - shape: CircleBorder(),
156 - child: Text('$index',
157 - style: TextStyle(
158 - fontSize: 23.0,
159 - color: Palette.blueGrey)),
160 - ),
161 - );
162 - }),
163 - )
164 - : null))
165 - ],
166 - ),
167 - )),
168 - );
169 - }
170 -
171 - void _showIncorrectPinDialog(BuildContext context) async {
172 - await showDialog<void>(
173 - context: context,
174 - builder: (BuildContext context) {
175 - return AlertDialog(
176 - content: Text(S.of(context).pin_is_incorrect),
177 - actions: <Widget>[
178 - FlatButton(
179 - child: Text(S.of(context).ok),
180 - onPressed: () {
181 - Navigator.of(context).pop();
182 - },
183 - ),
184 - ],
185 - );
186 - });
187 - }
188 -
189 - void _push(int num) {
190 - if (_pinLength() >= pinLength) {
191 - return;
192 - }
193 -
194 - for (var i = 0; i < pin.length; i++) {
195 - if (pin[i] == null) {
196 - setState(() => pin[i] = num);
197 - break;
198 - }
199 - }
200 -
201 - final currentPinLength = _pinLength();
202 -
203 - if (currentPinLength == pinLength) {
204 - if (listEquals<int>(pin, currentPin)) {
205 - Navigator.pop(context, true);
206 - } else {
207 - Navigator.pop(context, false);
208 -
209 - _showIncorrectPinDialog(context);
210 - }
211 - }
212 - }
213 -
214 - void _pop() {
215 - if (_pinLength() == 0) {
216 - return;
217 - }
218 -
219 - for (var i = pin.length - 1; i >= 0; i--) {
220 - if (pin[i] != null) {
221 - setState(() => pin[i] = null);
222 - break;
223 - }
224 - }
225 - }
226 -
227 - int _pinLength() {
228 - return pin.fold(0, (v, e) {
229 - if (e != null) {
230 - return v + 1;
231 - }
232 -
233 - return v;
234 - });
235 - }
236 -}
lib/src/screens/settings/settings.dart
+21 -16
@@ -1,7 +1,6 @@
1 import 'package:cake_wallet/src/screens/auth/auth_page.dart';
2 import 'package:flutter/material.dart';
3 import 'package:flutter/cupertino.dart';
4 -import 'package:cake_wallet/palette.dart';
4 import 'package:url_launcher/url_launcher.dart';
5 import 'package:flutter_mobx/flutter_mobx.dart';
6 import 'package:provider/provider.dart';
@@ -30,9 +29,6 @@ class SettingsPage extends BasePage {
29 @override
30 String get title => S.current.settings_title;
31
33 - @override
34 - Color get backgroundColor => PaletteDark.historyPanel;
35 -
32 @override
33 Widget body(BuildContext context) {
34 return SettingsForm();
@@ -79,7 +75,7 @@ class SettingsFormState extends State<SettingsForm> {
75 textAlign: TextAlign.right,
76 style: TextStyle(
77 fontSize: 14.0,
82 - color: PaletteDark.walletCardText),
78 + color: Theme.of(context).primaryTextTheme.caption.color),
79 )),
80 attribute: Attributes.widget),
81 SettingsItem(
@@ -91,7 +87,7 @@ class SettingsFormState extends State<SettingsForm> {
87 textAlign: TextAlign.right,
88 style: TextStyle(
89 fontSize: 14.0,
94 - color: PaletteDark.walletCardText),
90 + color: Theme.of(context).primaryTextTheme.caption.color),
91 )),
92 attribute: Attributes.widget),
93 SettingsItem(
@@ -103,7 +99,7 @@ class SettingsFormState extends State<SettingsForm> {
99 textAlign: TextAlign.right,
100 style: TextStyle(
101 fontSize: 14.0,
106 - color: PaletteDark.walletCardText),
102 + color: Theme.of(context).primaryTextTheme.caption.color),
103 )),
104 attribute: Attributes.widget),
105 SettingsItem(
@@ -145,7 +141,11 @@ class SettingsFormState extends State<SettingsForm> {
141 children: [
142 Text(S
143 .of(context)
148 - .settings_transactions),
144 + .settings_transactions,
145 + style: TextStyle(
146 + color: Theme.of(context).primaryTextTheme.title.color
147 + ),
148 + ),
149 Checkbox(
150 value: settingsStore
151 .actionlistDisplayMode
@@ -162,7 +162,12 @@ class SettingsFormState extends State<SettingsForm> {
162 mainAxisAlignment:
163 MainAxisAlignment.spaceBetween,
164 children: [
165 - Text(S.of(context).settings_trades),
165 + Text(
166 + S.of(context).settings_trades,
167 + style: TextStyle(
168 + color: Theme.of(context).primaryTextTheme.title.color
169 + ),
170 + ),
171 Checkbox(
172 value: settingsStore
173 .actionlistDisplayMode
@@ -182,7 +187,7 @@ class SettingsFormState extends State<SettingsForm> {
187 Text(S.of(context).settings_display_on_dashboard_list,
188 style: TextStyle(
189 fontSize: 14,
185 - color: Colors.white)),
190 + color: Theme.of(context).primaryTextTheme.title.color)),
191 Observer(builder: (_) {
192 var title = '';
193
@@ -210,7 +215,7 @@ class SettingsFormState extends State<SettingsForm> {
215 return Text(title,
216 style: TextStyle(
217 fontSize: 14.0,
213 - color: PaletteDark.walletCardText));
218 + color: Theme.of(context).primaryTextTheme.caption.color));
219 })
220 ]),
221 ));
@@ -321,20 +326,19 @@ class SettingsFormState extends State<SettingsForm> {
326 final shortDivider = Container(
327 height: 1,
328 padding: EdgeInsets.only(left: 24),
324 - color: PaletteDark.menuList,
329 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
330 child: Container(
331 height: 1,
327 - color: PaletteDark.mainBackgroundColor,
332 + color: Theme.of(context).dividerColor,
333 ),
334 );
335
336 final longDivider = Container(
337 height: 1,
333 - color: PaletteDark.mainBackgroundColor,
338 + color: Theme.of(context).dividerColor,
339 );
340
341 return Container(
337 - color: PaletteDark.historyPanel,
342 padding: EdgeInsets.only(top: 12),
343 child: SingleChildScrollView(
344 child: Column(
@@ -371,7 +375,8 @@ class SettingsFormState extends State<SettingsForm> {
375 child: Text(
376 settingsStore.itemHeaders[ItemHeaders.version],
377 style: TextStyle(
374 - fontSize: 14.0, color: PaletteDark.walletCardText)
378 + fontSize: 14.0,
379 + color: Theme.of(context).primaryTextTheme.caption.color)
380 ),
381 ),
382 ),
lib/src/screens/settings/widgets/settings_arrow_list_row.dart
+4 -5
@@ -1,4 +1,3 @@
1 -import 'package:cake_wallet/palette.dart';
1 import 'package:provider/provider.dart';
2 import 'package:flutter/material.dart';
3 import 'package:flutter_mobx/flutter_mobx.dart';
@@ -9,15 +8,15 @@ class SettingsArrowListRow extends StatelessWidget {
8
9 final VoidCallback onTaped;
10 final String title;
12 - final _cakeArrowImage = Image.asset('assets/images/select_arrow.png',
13 - color: PaletteDark.walletCardText);
11
12 @override
13 Widget build(BuildContext context) {
14 final settingsStore = Provider.of<SettingsStore>(context);
15 + final _cakeArrowImage = Image.asset('assets/images/select_arrow.png',
16 + color: Theme.of(context).primaryTextTheme.caption.color);
17
18 return Container(
20 - color: PaletteDark.menuList,
19 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
20 child: ListTile(
21 contentPadding: EdgeInsets.only(left: 24.0, right: 24.0),
22 title: Observer(
@@ -25,7 +24,7 @@ class SettingsArrowListRow extends StatelessWidget {
24 settingsStore.itemHeaders[title],
25 style: TextStyle(
26 fontSize: 14.0,
28 - color: Colors.white),
27 + color: Theme.of(context).primaryTextTheme.title.color),
28 )),
29 trailing: _cakeArrowImage,
30 onTap: onTaped),
lib/src/screens/settings/widgets/settings_header_list_row.dart
+2 -2
@@ -1,7 +1,6 @@
1 import 'package:flutter/material.dart';
2 import 'package:flutter_mobx/flutter_mobx.dart';
3 import 'package:cake_wallet/src/stores/settings/settings_store.dart';
4 -import 'package:cake_wallet/palette.dart';
4 import 'package:provider/provider.dart';
5
6 class SettingsHeaderListRow extends StatelessWidget {
@@ -29,7 +28,8 @@ class SettingsHeaderListRow extends StatelessWidget {
28 ? settingsStore.itemHeaders[title]
29 : '',
30 style: TextStyle(
32 - fontSize: 15.0, color: Palette.wildDarkBlue),
31 + fontSize: 15.0,
32 + color: Theme.of(context).primaryTextTheme.caption.color),
33 ))
34 ],
35 ),
lib/src/screens/settings/widgets/settings_link_list_row.dart
+2 -3
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2
3 class SettingsLinktListRow extends StatelessWidget {
4 SettingsLinktListRow(
@@ -13,7 +12,7 @@ class SettingsLinktListRow extends StatelessWidget {
12 @override
13 Widget build(BuildContext context) {
14 return Container(
16 - color: PaletteDark.menuList,
15 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
16 child: ListTile(
17 contentPadding: EdgeInsets.only(left: 24.0, right: 24.0),
18 title: Row(
@@ -27,7 +26,7 @@ class SettingsLinktListRow extends StatelessWidget {
26 title,
27 style: TextStyle(
28 fontSize: 14.0,
30 - color: Colors.white),
29 + color: Theme.of(context).primaryTextTheme.title.color),
30 ),
31 )
32 ],
lib/src/screens/settings/widgets/settings_raw_widget_list_row.dart
+1 -2
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2
3 class SettingRawWidgetListRow extends StatelessWidget {
4 SettingRawWidgetListRow({@required this.widgetBuilder});
@@ -9,7 +8,7 @@ class SettingRawWidgetListRow extends StatelessWidget {
8 @override
9 Widget build(BuildContext context) {
10 return Container(
12 - color: PaletteDark.menuList,
11 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
12 child: widgetBuilder(context) ?? Container(),
13 );
14 }
lib/src/screens/settings/widgets/settings_switch_list_row.dart
+2 -3
@@ -1,4 +1,3 @@
1 -import 'package:cake_wallet/palette.dart';
1 import 'package:flutter/material.dart';
2 import 'package:provider/provider.dart';
3 import 'package:flutter_mobx/flutter_mobx.dart';
@@ -62,14 +61,14 @@ class SettingsSwitchListRow extends StatelessWidget {
61 final settingsStore = Provider.of<SettingsStore>(context);
62
63 return Container(
65 - color: PaletteDark.menuList,
64 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
65 child: ListTile(
66 contentPadding: EdgeInsets.only(left: 24.0, right: 24.0),
67 title: Observer(
68 builder: (_) => Text(settingsStore.itemHeaders[title],
69 style: TextStyle(
70 fontSize: 14,
72 - color: Colors.white)),
71 + color: Theme.of(context).primaryTextTheme.title.color)),
72 ),
73 trailing: _getSwitch(context)),
74 );
lib/src/screens/settings/widgets/settings_text_list_row.dart
+2 -3
@@ -1,4 +1,3 @@
1 -import 'package:cake_wallet/palette.dart';
1 import 'package:provider/provider.dart';
2 import 'package:flutter/material.dart';
3 import 'package:flutter_mobx/flutter_mobx.dart';
@@ -16,7 +15,7 @@ class SettingsTextListRow extends StatelessWidget {
15 final settingsStore = Provider.of<SettingsStore>(context);
16
17 return Container(
19 - color: PaletteDark.menuList,
18 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
19 child: ListTile(
20 contentPadding: EdgeInsets.only(left: 24.0, right: 24.0),
21 title: Row(
@@ -28,7 +27,7 @@ class SettingsTextListRow extends StatelessWidget {
27 settingsStore.itemHeaders[title],
28 style: TextStyle(
29 fontSize: 14.0,
31 - color: Colors.white),
30 + color: Theme.of(context).primaryTextTheme.title.color),
31 )),
32 ),
33 Flexible(
lib/src/screens/setup_pin_code/setup_pin_code.dart
-4
@@ -7,7 +7,6 @@ import 'package:cake_wallet/src/screens/pin_code/pin_code.dart';
7 import 'package:cake_wallet/src/screens/base_page.dart';
8 import 'package:cake_wallet/src/stores/settings/settings_store.dart';
9 import 'package:cake_wallet/generated/i18n.dart';
10 -import 'package:cake_wallet/palette.dart';
10 import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
11
12 class SetupPinCodePage extends BasePage {
@@ -15,9 +14,6 @@ class SetupPinCodePage extends BasePage {
14
15 final Function(BuildContext, String) onPinCodeSetup;
16
18 - @override
19 - Color get backgroundColor => PaletteDark.historyPanel;
20 -
17 @override
18 String get title => S.current.setup_pin;
19
lib/src/screens/show_keys/show_keys_page.dart
+2 -7
@@ -3,16 +3,12 @@ import 'package:flutter/material.dart';
3 import 'package:flutter/cupertino.dart';
4 import 'package:flutter/services.dart';
5 import 'package:flutter_mobx/flutter_mobx.dart';
6 -import 'package:cake_wallet/palette.dart';
6 import 'package:cake_wallet/generated/i18n.dart';
7 import 'package:cake_wallet/src/stores/wallet/wallet_keys_store.dart';
8 import 'package:cake_wallet/src/screens/base_page.dart';
9 import 'package:cake_wallet/src/widgets/standart_list_row.dart';
10
11 class ShowKeysPage extends BasePage {
13 - @override
14 - Color get backgroundColor => PaletteDark.historyPanel;
15 -
12 @override
13 String get title => S.current.wallet_keys;
14
@@ -21,7 +17,6 @@ class ShowKeysPage extends BasePage {
17 final walletKeysStore = Provider.of<WalletKeysStore>(context);
18
19 return Container(
24 - color: PaletteDark.historyPanel,
20 padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
21 child: Observer(
22 builder: (_) {
@@ -36,10 +31,10 @@ class ShowKeysPage extends BasePage {
31 separatorBuilder: (context, index) => Container(
32 height: 1,
33 padding: EdgeInsets.only(left: 24),
39 - color: PaletteDark.menuList,
34 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
35 child: Container(
36 height: 1,
42 - color: PaletteDark.walletCardTopEndSync,
37 + color: Theme.of(context).dividerColor,
38 ),
39 ),
40 itemCount: keysMap.length,
lib/src/screens/subaddress/new_subaddress_page.dart
-5
@@ -9,7 +9,6 @@ import 'package:cake_wallet/src/stores/subaddress_creation/subaddress_creation_s
9 import 'package:cake_wallet/src/stores/subaddress_creation/subaddress_creation_store.dart';
10 import 'package:cake_wallet/src/widgets/primary_button.dart';
11 import 'package:cake_wallet/src/screens/base_page.dart';
12 -import 'package:cake_wallet/palette.dart';
12 import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
13
14 class NewSubaddressPage extends BasePage {
@@ -20,9 +19,6 @@ class NewSubaddressPage extends BasePage {
19 @override
20 String get title => S.current.new_subaddress_title;
21
23 - @override
24 - Color get backgroundColor => PaletteDark.historyPanel;
25 -
22 @override
23 Widget body(BuildContext context) => NewSubaddressForm(subaddress);
24
@@ -86,7 +82,6 @@ class NewSubaddressFormState extends State<NewSubaddressForm> {
82 return Form(
83 key: _formKey,
84 child: Container(
89 - color: PaletteDark.historyPanel,
85 padding: EdgeInsets.all(24.0),
86 child: Column(
87 children: <Widget>[
lib/src/screens/trade_details/trade_details_page.dart
+2 -7
@@ -9,13 +9,9 @@ import 'package:cake_wallet/src/stores/settings/settings_store.dart';
9 import 'package:cake_wallet/src/screens/base_page.dart';
10 import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart';
11 import 'package:cake_wallet/src/widgets/standart_list_row.dart';
12 -import 'package:cake_wallet/palette.dart';
12
13 class TradeDetailsPage extends BasePage {
14
16 - @override
17 - Color get backgroundColor => PaletteDark.historyPanel;
18 -
15 @override
16 String get title => S.current.trade_details_title;
17
@@ -28,7 +24,6 @@ class TradeDetailsPage extends BasePage {
24 formatDefault: "dd.MM.yyyy, HH:mm");
25
26 return Container(
31 - color: PaletteDark.historyPanel,
27 padding: EdgeInsets.only(top: 20, bottom: 20),
28 child: Observer(builder: (_) {
29 final trade = exchangeStore.trade;
@@ -64,10 +59,10 @@ class TradeDetailsPage extends BasePage {
59 separatorBuilder: (_, __) => Container(
60 height: 1,
61 padding: EdgeInsets.only(left: 24),
67 - color: PaletteDark.menuList,
62 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
63 child: Container(
64 height: 1,
70 - color: PaletteDark.walletCardTopEndSync,
65 + color: Theme.of(context).dividerColor,
66 ),
67 ),
68 itemCount: items.length,
lib/src/screens/transaction_details/transaction_details_page.dart
+2 -6
@@ -15,9 +15,6 @@ class TransactionDetailsPage extends BasePage {
15
16 final TransactionInfo transactionInfo;
17
18 - @override
19 - Color get backgroundColor => PaletteDark.historyPanel;
20 -
18 @override
19 String get title => S.current.transaction_details_title;
20
@@ -78,16 +75,15 @@ class TransactionDetailsFormState extends State<TransactionDetailsForm> {
75 @override
76 Widget build(BuildContext context) {
77 return Container(
81 - color: PaletteDark.historyPanel,
78 padding: EdgeInsets.only(top: 20, bottom: 20),
79 child: ListView.separated(
80 separatorBuilder: (context, index) => Container(
81 height: 1,
82 padding: EdgeInsets.only(left: 24),
87 - color: PaletteDark.menuList,
83 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
84 child: Container(
85 height: 1,
90 - color: PaletteDark.walletCardTopEndSync,
86 + color: Theme.of(context).dividerColor,
87 ),
88 ),
89 itemCount: _items.length,
lib/src/screens/wallet_list/wallet_list_page.dart
+17 -12
@@ -14,10 +14,6 @@ import 'package:cake_wallet/src/screens/wallet_list/wallet_menu.dart';
14 import 'package:cake_wallet/src/screens/wallet_list/widgets/wallet_tile.dart';
15
16 class WalletListPage extends BasePage {
17 -
18 - @override
19 - Color get backgroundColor => PaletteDark.historyPanel;
20 -
17 @override
18 Widget body(BuildContext context) => WalletListBody();
19 }
@@ -29,8 +25,6 @@ class WalletListBody extends StatefulWidget {
25
26 class WalletListBodyState extends State<WalletListBody> {
27 final moneroIcon = Image.asset('assets/images/monero.png', height: 24, width: 24);
32 - final newWalletImage = Image.asset('assets/images/new_wallet.png', height: 12, width: 12, color: PaletteDark.historyPanel);
33 - final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', height: 12, width: 12, color: Colors.white);
28 WalletListStore _walletListStore;
29 ScrollController scrollController = ScrollController();
30
@@ -39,10 +33,18 @@ class WalletListBodyState extends State<WalletListBody> {
33 final walletStore = Provider.of<WalletStore>(context);
34 _walletListStore = Provider.of<WalletListStore>(context);
35
36 + final newWalletImage = Image.asset('assets/images/new_wallet.png',
37 + height: 12,
38 + width: 12,
39 + color: Palette.oceanBlue);
40 + final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
41 + height: 12,
42 + width: 12,
43 + color: Theme.of(context).primaryTextTheme.title.color);
44 +
45 return SafeArea(
46 child: Container(
47 padding: EdgeInsets.only(top: 16),
45 - color: PaletteDark.historyPanel,
48 child: ScrollableWithBottomSection(
49 contentPadding: EdgeInsets.only(bottom: 20),
50 content: Container(
@@ -51,7 +53,8 @@ class WalletListBodyState extends State<WalletListBody> {
53 shrinkWrap: true,
54 physics: const NeverScrollableScrollPhysics(),
55 separatorBuilder: (_, index) => Divider(
54 - color: PaletteDark.historyPanel, height: 16),
56 + color: Theme.of(context).backgroundColor,
57 + height: 16),
58 itemCount: _walletListStore.wallets.length,
59 itemBuilder: (__, index) {
60 final wallet = _walletListStore.wallets[index];
@@ -110,7 +113,7 @@ class WalletListBodyState extends State<WalletListBody> {
113 child: Container(
114 height: 108,
115 width: 108,
113 - color: PaletteDark.historyPanel,
116 + color: Theme.of(context).backgroundColor,
117 child: Container(
118 padding: EdgeInsets.only(left: 5, right: 5),
119 decoration: BoxDecoration(
@@ -156,15 +159,17 @@ class WalletListBodyState extends State<WalletListBody> {
159 image: newWalletImage,
160 text: S.of(context).wallet_list_create_new_wallet,
161 color: Colors.white,
159 - textColor: PaletteDark.historyPanel),
162 + textColor: Palette.oceanBlue,
163 + borderColor: Palette.oceanBlue,
164 + ),
165 SizedBox(height: 10.0),
166 PrimaryImageButton(
167 onPressed: () =>
168 Navigator.of(context).pushNamed(Routes.restoreWalletOptions),
169 image: restoreWalletImage,
170 text: S.of(context).wallet_list_restore_wallet,
166 - color: PaletteDark.historyPanelButton,
167 - textColor: Colors.white)
171 + color: Theme.of(context).primaryTextTheme.overline.color,
172 + textColor: Theme.of(context).primaryTextTheme.title.color)
173 ])),
174 )
175 );
lib/src/screens/wallet_list/widgets/wallet_tile.dart
+22 -12
@@ -1,6 +1,5 @@
1 import 'package:flutter/material.dart';
2 import 'package:flutter/cupertino.dart';
3 -import 'package:cake_wallet/palette.dart';
3
4 class WalletTile extends SliverPersistentHeaderDelegate {
5 WalletTile({
@@ -29,8 +28,8 @@ class WalletTile extends SliverPersistentHeaderDelegate {
28 panelWidth = panelWidth < 12 ? 0 : 12;
29
30 final currentColor = isCurrent
32 - ? Colors.white
33 - : PaletteDark.historyPanel;
31 + ? Theme.of(context).accentTextTheme.caption.color
32 + : Theme.of(context).backgroundColor;
33
34 return Stack(
35 fit: StackFit.expand,
@@ -55,7 +54,7 @@ class WalletTile extends SliverPersistentHeaderDelegate {
54 height: 108,
55 width: max - 16,
56 padding: EdgeInsets.only(left: 20, right: 20),
58 - color: PaletteDark.historyPanel,
57 + color: Theme.of(context).backgroundColor,
58 child: Column(
59 mainAxisSize: MainAxisSize.max,
60 mainAxisAlignment: MainAxisAlignment.center,
@@ -71,7 +70,7 @@ class WalletTile extends SliverPersistentHeaderDelegate {
70 style: TextStyle(
71 fontSize: 22,
72 fontWeight: FontWeight.bold,
74 - color: Colors.white
73 + color: Theme.of(context).primaryTextTheme.title.color
74 ),
75 )
76 ],
@@ -87,7 +86,7 @@ class WalletTile extends SliverPersistentHeaderDelegate {
86 walletAddress,
87 style: TextStyle(
88 fontSize: 12,
90 - color: PaletteDark.walletCardText
89 + color: Theme.of(context).primaryTextTheme.caption.color
90 ),
91 )
92 ],
@@ -105,16 +104,27 @@ class WalletTile extends SliverPersistentHeaderDelegate {
104 child: Container(
105 height: 108,
106 width: panelWidth,
107 + padding: EdgeInsets.only(
108 + top: 1,
109 + left: 1,
110 + bottom: 1
111 + ),
112 decoration: BoxDecoration(
113 + borderRadius: BorderRadius.only(topLeft: Radius.circular(12), bottomLeft: Radius.circular(12)),
114 + color: Theme.of(context).accentTextTheme.subtitle.color
115 + ),
116 + child: Container(
117 + decoration: BoxDecoration(
118 borderRadius: BorderRadius.only(topLeft: Radius.circular(12), bottomLeft: Radius.circular(12)),
119 gradient: LinearGradient(
111 - begin: Alignment.topCenter,
112 - end: Alignment.bottomCenter,
113 - colors: [
114 - PaletteDark.walletCardTopEndSync,
115 - PaletteDark.walletCardBottomEndSync
116 - ]
120 + begin: Alignment.topCenter,
121 + end: Alignment.bottomCenter,
122 + colors: [
123 + Theme.of(context).accentTextTheme.caption.backgroundColor,
124 + Theme.of(context).accentTextTheme.caption.decorationColor
125 + ]
126 )
127 + ),
128 ),
129 ),
130 )
lib/src/screens/welcome/welcome_page.dart
+18 -13
@@ -9,11 +9,6 @@ import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
9 class WelcomePage extends BasePage {
10 static const aspectRatioImage = 1.25;
11 final welcomeImage = Image.asset('assets/images/welcome.png');
12 - final newWalletImage = Image.asset('assets/images/new_wallet.png', height: 12, width: 12, color: PaletteDark.historyPanel);
13 - final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', height: 12, width: 12, color: Colors.white);
14 -
15 - @override
16 - Color get backgroundColor => PaletteDark.historyPanel;
12
13 @override
14 Widget build(BuildContext context) {
@@ -25,9 +20,17 @@ class WelcomePage extends BasePage {
20
21 @override
22 Widget body(BuildContext context) {
23 + final newWalletImage = Image.asset('assets/images/new_wallet.png',
24 + height: 12,
25 + width: 12,
26 + color: Palette.oceanBlue);
27 + final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
28 + height: 12,
29 + width: 12,
30 + color: Theme.of(context).primaryTextTheme.title.color);
31 +
32 return Container(
33 padding: EdgeInsets.only(top: 20),
30 - color: PaletteDark.historyPanel,
34 child: ScrollableWithBottomSection(
35 contentPadding: EdgeInsets.only(bottom: 20),
36 content: Column(
@@ -45,7 +48,7 @@ class WelcomePage extends BasePage {
48 S.of(context).welcome,
49 style: TextStyle(
50 fontSize: 18,
48 - color: PaletteDark.walletCardText,
51 + color: Theme.of(context).primaryTextTheme.caption.color,
52 ),
53 textAlign: TextAlign.center,
54 ),
@@ -56,7 +59,7 @@ class WelcomePage extends BasePage {
59 style: TextStyle(
60 fontSize: 36,
61 fontWeight: FontWeight.bold,
59 - color: Colors.white,
62 + color: Theme.of(context).primaryTextTheme.title.color,
63 ),
64 textAlign: TextAlign.center,
65 ),
@@ -68,7 +71,7 @@ class WelcomePage extends BasePage {
71 style: TextStyle(
72 fontSize: 16,
73 fontWeight: FontWeight.w600,
71 - color: PaletteDark.walletCardText,
74 + color: Theme.of(context).primaryTextTheme.caption.color,
75 ),
76 textAlign: TextAlign.center,
77 ),
@@ -84,7 +87,7 @@ class WelcomePage extends BasePage {
87 S.of(context).please_make_selection,
88 style: TextStyle(
89 fontSize: 12,
87 - color: PaletteDark.walletCardText,
90 + color: Theme.of(context).primaryTextTheme.caption.color,
91 ),
92 textAlign: TextAlign.center,
93 ),
@@ -95,7 +98,9 @@ class WelcomePage extends BasePage {
98 image: newWalletImage,
99 text: S.of(context).create_new,
100 color: Colors.white,
98 - textColor: PaletteDark.historyPanel),
101 + textColor: Palette.oceanBlue,
102 + borderColor: Palette.oceanBlue,
103 + ),
104 ),
105 Padding(
106 padding: EdgeInsets.only(top: 10),
@@ -103,8 +108,8 @@ class WelcomePage extends BasePage {
108 onPressed: () => Navigator.pushNamed(context, Routes.restoreOptions),
109 image: restoreWalletImage,
110 text: S.of(context).restore_wallet,
106 - color: PaletteDark.historyPanelButton,
107 - textColor: Colors.white),
111 + color: Theme.of(context).primaryTextTheme.overline.color,
112 + textColor: Theme.of(context).primaryTextTheme.title.color),
113 )
114 ]),
115 ),
lib/src/widgets/address_text_field.dart
+9 -10
@@ -1,6 +1,5 @@
1 import 'package:cake_wallet/routes.dart';
2 import 'package:flutter/material.dart';
3 -import 'package:cake_wallet/palette.dart';
3 import 'package:cake_wallet/generated/i18n.dart';
4 import 'package:cake_wallet/src/domain/common/contact.dart';
5 import 'package:cake_wallet/src/domain/monero/subaddress.dart';
@@ -20,7 +19,7 @@ class AddressTextField extends StatelessWidget {
19 this.onURIScanned,
20 this.focusNode,
21 this.isBorderExist = true,
23 - this.buttonColor = PaletteDark.walletCardSubAddressField,
22 + this.buttonColor,
23 this.validator});
24
25 static const prefixIconWidth = 34.0;
@@ -46,7 +45,7 @@ class AddressTextField extends StatelessWidget {
45 focusNode: focusNode,
46 style: TextStyle(
47 fontSize: 16,
49 - color: Colors.white
48 + color: Theme.of(context).primaryTextTheme.title.color
49 ),
50 decoration: InputDecoration(
51 suffixIcon: SizedBox(
@@ -66,7 +65,7 @@ class AddressTextField extends StatelessWidget {
65 child: Container(
66 padding: EdgeInsets.all(8),
67 decoration: BoxDecoration(
69 - color: buttonColor,
68 + color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
69 borderRadius:
70 BorderRadius.all(Radius.circular(6))),
71 child: Image.asset('assets/images/qr_code_icon.png')),
@@ -84,7 +83,7 @@ class AddressTextField extends StatelessWidget {
83 child: Container(
84 padding: EdgeInsets.all(8),
85 decoration: BoxDecoration(
87 - color: buttonColor,
86 + color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
87 borderRadius:
88 BorderRadius.all(Radius.circular(6))),
89 child: Image.asset(
@@ -103,7 +102,7 @@ class AddressTextField extends StatelessWidget {
102 child: Container(
103 padding: EdgeInsets.all(8),
104 decoration: BoxDecoration(
106 - color: buttonColor,
105 + color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
106 borderRadius:
107 BorderRadius.all(Radius.circular(6))),
108 child: Image.asset(
@@ -115,24 +114,24 @@ class AddressTextField extends StatelessWidget {
114 ),
115 hintStyle: TextStyle(
116 fontSize: 16,
118 - color: PaletteDark.walletCardText
117 + color: Theme.of(context).primaryTextTheme.caption.color
118 ),
119 hintText: placeholder ?? S.current.widgets_address,
120 focusedBorder: isBorderExist
121 ? UnderlineInputBorder(
122 borderSide: BorderSide(
124 - color: PaletteDark.walletCardSubAddressField,
123 + color: Theme.of(context).dividerColor,
124 width: 1.0))
125 : InputBorder.none,
126 disabledBorder: isBorderExist
127 ? UnderlineInputBorder(
128 borderSide:
130 - BorderSide(color: PaletteDark.walletCardSubAddressField, width: 1.0))
129 + BorderSide(color: Theme.of(context).dividerColor, width: 1.0))
130 : InputBorder.none,
131 enabledBorder: isBorderExist
132 ? UnderlineInputBorder(
133 borderSide:
135 - BorderSide(color: PaletteDark.walletCardSubAddressField, width: 1.0))
134 + BorderSide(color: Theme.of(context).dividerColor, width: 1.0))
135 : InputBorder.none,
136 ),
137 validator: validator,
lib/src/widgets/base_alert_dialog.dart
+5 -5
@@ -18,7 +18,7 @@ class BaseAlertDialog extends StatelessWidget {
18 style: TextStyle(
19 fontSize: 20,
20 fontWeight: FontWeight.w600,
21 - color: Colors.white,
21 + color: Theme.of(context).primaryTextTheme.title.color,
22 decoration: TextDecoration.none,
23 ),
24 );
@@ -31,7 +31,7 @@ class BaseAlertDialog extends StatelessWidget {
31 style: TextStyle(
32 fontSize: 16,
33 fontWeight: FontWeight.w600,
34 - color: Colors.white,
34 + color: Theme.of(context).primaryTextTheme.title.color,
35 decoration: TextDecoration.none,
36 ),
37 );
@@ -122,7 +122,7 @@ class BaseAlertDialog extends StatelessWidget {
122 child: BackdropFilter(
123 filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
124 child: Container(
125 - decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
125 + decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)),
126 child: Center(
127 child: GestureDetector(
128 onTap: () => null,
@@ -131,7 +131,7 @@ class BaseAlertDialog extends StatelessWidget {
131 height: 257,
132 decoration: BoxDecoration(
133 borderRadius: BorderRadius.all(Radius.circular(24)),
134 - color: PaletteDark.menuHeader
134 + color: Theme.of(context).accentTextTheme.title.backgroundColor
135 ),
136 child: Column(
137 children: <Widget>[
@@ -152,7 +152,7 @@ class BaseAlertDialog extends StatelessWidget {
152 Container(
153 width: 300,
154 height: 1,
155 - color: PaletteDark.menuList,
155 + color: Theme.of(context).dividerColor,
156 ),
157 Container(
158 width: 300,
lib/src/widgets/base_text_form_field.dart
+7 -8
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2 import 'package:flutter/services.dart';
3
4 class BaseTextFormField extends StatelessWidget {
@@ -12,9 +11,9 @@ class BaseTextFormField extends StatelessWidget {
11 this.hintText = '',
12 this.maxLines = 1,
13 this.inputFormatters,
15 - this.textColor = Colors.white,
16 - this.hintColor = PaletteDark.walletCardText,
17 - this.borderColor = PaletteDark.menuList,
14 + this.textColor,
15 + this.hintColor,
16 + this.borderColor,
17 this.prefix,
18 this.suffix,
19 this.suffixIcon,
@@ -52,26 +51,26 @@ class BaseTextFormField extends StatelessWidget {
51 enabled: enabled,
52 style: TextStyle(
53 fontSize: 16.0,
55 - color: textColor
54 + color: textColor ?? Theme.of(context).primaryTextTheme.title.color
55 ),
56 decoration: InputDecoration(
57 prefix: prefix,
58 suffix: suffix,
59 suffixIcon: suffixIcon,
60 hintStyle: TextStyle(
62 - color: hintColor,
61 + color: hintColor ?? Theme.of(context).primaryTextTheme.caption.color,
62 fontSize: 16
63 ),
64 hintText: hintText,
65 focusedBorder: UnderlineInputBorder(
66 borderSide: BorderSide(
68 - color: borderColor,
67 + color: borderColor ?? Theme.of(context).dividerColor,
68 width: 1.0
69 )
70 ),
71 enabledBorder: UnderlineInputBorder(
72 borderSide: BorderSide(
74 - color: borderColor,
73 + color: borderColor ?? Theme.of(context).dividerColor,
74 width: 1.0
75 )
76 )
lib/src/widgets/blockchain_height_widget.dart
+9 -10
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
2 import 'package:intl/intl.dart';
3 import 'package:cake_wallet/generated/i18n.dart';
4 import 'package:cake_wallet/src/domain/monero/get_height_by_date.dart';
5 -import 'package:cake_wallet/palette.dart';
5
6 class BlockchainHeightWidget extends StatefulWidget {
7 BlockchainHeightWidget({GlobalKey key}) : super(key: key);
@@ -39,24 +38,24 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
38 child: TextFormField(
39 style: TextStyle(
40 fontSize: 16.0,
42 - color: Colors.white
41 + color: Theme.of(context).primaryTextTheme.title.color
42 ),
43 controller: restoreHeightController,
44 keyboardType: TextInputType.numberWithOptions(
45 signed: false, decimal: false),
46 decoration: InputDecoration(
47 hintStyle: TextStyle(
49 - color: PaletteDark.walletCardText,
48 + color: Theme.of(context).primaryTextTheme.caption.color,
49 fontSize: 16
50 ),
51 hintText: S.of(context).widgets_restore_from_blockheight,
52 focusedBorder: UnderlineInputBorder(
53 borderSide: BorderSide(
55 - color: PaletteDark.menuList,
54 + color: Theme.of(context).dividerColor,
55 width: 1.0)),
56 enabledBorder: UnderlineInputBorder(
57 borderSide: BorderSide(
59 - color: PaletteDark.menuList,
58 + color: Theme.of(context).dividerColor,
59 width: 1.0))),
60 ),
61 ))
@@ -69,7 +68,7 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
68 style: TextStyle(
69 fontSize: 16.0,
70 fontWeight: FontWeight.bold,
72 - color: Colors.white),
71 + color: Theme.of(context).primaryTextTheme.title.color),
72 ),
73 ),
74 Row(
@@ -82,21 +81,21 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
81 child: TextFormField(
82 style: TextStyle(
83 fontSize: 16.0,
85 - color: Colors.white
84 + color: Theme.of(context).primaryTextTheme.title.color
85 ),
86 decoration: InputDecoration(
87 hintStyle: TextStyle(
89 - color: PaletteDark.walletCardText,
88 + color: Theme.of(context).primaryTextTheme.caption.color,
89 fontSize: 16
90 ),
91 hintText: S.of(context).widgets_restore_from_date,
92 focusedBorder: UnderlineInputBorder(
93 borderSide: BorderSide(
95 - color: PaletteDark.menuList,
94 + color: Theme.of(context).dividerColor,
95 width: 1.0)),
96 enabledBorder: UnderlineInputBorder(
97 borderSide: BorderSide(
99 - color: PaletteDark.menuList,
98 + color: Theme.of(context).dividerColor,
99 width: 1.0))),
100 controller: dateController,
101 validator: (value) {
lib/src/widgets/nav_bar.dart
-14
@@ -1,8 +1,5 @@
1 -import 'package:cake_wallet/theme_changer.dart';
2 -import 'package:cake_wallet/themes.dart';
1 import 'package:flutter/cupertino.dart';
2 import 'package:flutter/material.dart';
5 -import 'package:provider/provider.dart';
3
4 class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
5 factory NavBar(
@@ -11,8 +8,6 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
8 Widget middle,
9 Widget trailing,
10 Color backgroundColor}) {
14 - final _themeChanger = Provider.of<ThemeChanger>(context);
15 - final _isDarkTheme = _themeChanger.getTheme() == Themes.darkTheme;
11
12 return NavBar._internal(
13 leading: leading,
@@ -20,8 +15,6 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
15 trailing: trailing,
16 height: _height,
17 backgroundColor: backgroundColor);
23 - /*backgroundColor:
24 - _isDarkTheme ? Theme.of(context).backgroundColor : backgroundColor);*/
18 }
19
20 factory NavBar.withShadow(
@@ -30,8 +23,6 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
23 Widget middle,
24 Widget trailing,
25 Color backgroundColor}) {
33 - final _themeChanger = Provider.of<ThemeChanger>(context);
34 - final _isDarkTheme = _themeChanger.getTheme() == Themes.darkTheme;
26
27 return NavBar._internal(
28 leading: leading,
@@ -39,13 +30,8 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
30 trailing: trailing,
31 height: 80,
32 backgroundColor: backgroundColor,
42 - /*backgroundColor:
43 - _isDarkTheme ? Theme.of(context).backgroundColor : backgroundColor,*/
33 decoration: BoxDecoration(
34 color: backgroundColor,
46 - /*_isDarkTheme
47 - ? Theme.of(context).backgroundColor
48 - : backgroundColor,*/
35 boxShadow: [
36 BoxShadow(
37 color: Color.fromRGBO(132, 141, 198, 0.11),
lib/src/widgets/picker.dart
+5 -5
@@ -28,7 +28,7 @@ class Picker<Item extends Object> extends StatelessWidget {
28 child: BackdropFilter(
29 filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
30 child: Container(
31 - decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
31 + decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)),
32 child: Center(
33 child: Column(
34 mainAxisSize: MainAxisSize.min,
@@ -54,10 +54,10 @@ class Picker<Item extends Object> extends StatelessWidget {
54 borderRadius: BorderRadius.all(Radius.circular(14)),
55 child: Container(
56 height: 233,
57 - color: PaletteDark.menuList,
57 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
58 child: ListView.separated(
59 separatorBuilder: (context, index) => Divider(
60 - color: PaletteDark.mainBackgroundColor,
60 + color: Theme.of(context).dividerColor,
61 height: 1,
62 ),
63 itemCount: items == null ? 0 : items.length,
@@ -67,11 +67,11 @@ class Picker<Item extends Object> extends StatelessWidget {
67 final isItemSelected = index == selectedAtIndex;
68
69 final color = isItemSelected
70 - ? PaletteDark.menuHeader
70 + ? Theme.of(context).accentTextTheme.subtitle.decorationColor
71 : Colors.transparent;
72 final textColor = isItemSelected
73 ? Colors.blue
74 - : Colors.white;
74 + : Theme.of(context).primaryTextTheme.title.color;
75
76 return GestureDetector(
77 onTap: () {
lib/src/widgets/present_picker.dart deleted
-44
@@ -1,44 +0,0 @@
1 -import 'package:flutter/material.dart';
2 -import 'package:flutter/cupertino.dart';
3 -import 'package:cake_wallet/generated/i18n.dart';
4 -
5 -Future<T> presentPicker<T extends Object>(
6 - BuildContext context, List<T> list) async {
7 - T _value = list[0];
8 -
9 - return await showDialog(
10 - context: context,
11 - builder: (BuildContext context) {
12 - return AlertDialog(
13 - title: Text(S.of(context).please_select),
14 - backgroundColor: Theme.of(context).backgroundColor,
15 - content: Container(
16 - height: 150.0,
17 - child: CupertinoPicker(
18 - backgroundColor: Theme.of(context).backgroundColor,
19 - itemExtent: 45.0,
20 - onSelectedItemChanged: (int index) => _value = list[index],
21 - children: List.generate(
22 - list.length,
23 - (index) => Center(
24 - child: Text(
25 - list[index].toString(),
26 - style: TextStyle(
27 - color: Theme.of(context)
28 - .primaryTextTheme
29 - .caption
30 - .color),
31 - ),
32 - ))),
33 - ),
34 - actions: <Widget>[
35 - FlatButton(
36 - onPressed: () => Navigator.of(context).pop(),
37 - child: Text(S.of(context).cancel)),
38 - FlatButton(
39 - onPressed: () => Navigator.of(context).pop(_value),
40 - child: Text(S.of(context).ok))
41 - ],
42 - );
43 - });
44 -}
\ No newline at end of file
lib/src/widgets/primary_button.dart
+6 -2
@@ -30,7 +30,8 @@ class PrimaryButton extends StatelessWidget {
30 color: isDisabled ? color.withOpacity(0.5) : color,
31 disabledColor: color.withOpacity(0.5),
32 shape: RoundedRectangleBorder(
33 - borderRadius: BorderRadius.circular(26.0)),
33 + borderRadius: BorderRadius.circular(26.0),
34 + ),
35 child: Text(text,
36 textAlign: TextAlign.center,
37 style: TextStyle(
@@ -150,12 +151,14 @@ class PrimaryImageButton extends StatelessWidget {
151 @required this.image,
152 @required this.text,
153 @required this.color,
153 - @required this.textColor});
154 + @required this.textColor,
155 + this.borderColor = Colors.transparent});
156
157 final VoidCallback onPressed;
158 final Image image;
159 final Color color;
160 final Color textColor;
161 + final Color borderColor;
162 final String text;
163
164 @override
@@ -167,6 +170,7 @@ class PrimaryImageButton extends StatelessWidget {
170 onPressed: onPressed,
171 color: color,
172 shape: RoundedRectangleBorder(
173 + side: BorderSide(color: borderColor),
174 borderRadius: BorderRadius.circular(26.0)),
175 child:Center(
176 child: Row(
lib/src/widgets/seed_widget.dart
+13 -12
@@ -245,7 +245,7 @@ class SeedWidgetState extends State<SeedWidget> {
245 bottomLeft: Radius.circular(24),
246 bottomRight: Radius.circular(24)
247 ),
248 - color: PaletteDark.menuList
248 + color: Theme.of(context).accentTextTheme.title.backgroundColor
249 ),
250 child: SingleChildScrollView(
251 child: Column(
@@ -256,7 +256,7 @@ class SeedWidgetState extends State<SeedWidget> {
256 S.of(context).restore_active_seed,
257 style: TextStyle(
258 fontSize: 14,
259 - color: PaletteDark.walletCardText
259 + color: Theme.of(context).primaryTextTheme.caption.color
260 ),
261 ),
262 Padding(
@@ -275,8 +275,9 @@ class SeedWidgetState extends State<SeedWidget> {
275 child: Text(
276 item.toString(),
277 style: TextStyle(
278 - color:
279 - isValid ? Colors.white : Palette.lightGrey,
278 + color: isValid
279 + ? Theme.of(context).primaryTextTheme.title.color
280 + : Theme.of(context).primaryTextTheme.caption.color,
281 fontSize: 16,
282 fontWeight:
283 isSelected ? FontWeight.w900 : FontWeight.w400,
@@ -306,7 +307,7 @@ class SeedWidgetState extends State<SeedWidget> {
307 style: TextStyle(
308 fontSize: 18,
309 fontWeight: FontWeight.bold,
309 - color: Colors.white
310 + color: Theme.of(context).primaryTextTheme.title.color
311 ),
312 ),
313 Padding(
@@ -318,7 +319,7 @@ class SeedWidgetState extends State<SeedWidget> {
319 : null,
320 style: TextStyle(
321 fontSize: 16.0,
321 - color: Colors.white
322 + color: Theme.of(context).primaryTextTheme.title.color
323 ),
324 controller: _seedController,
325 textInputAction: TextInputAction.done,
@@ -333,7 +334,7 @@ class SeedWidgetState extends State<SeedWidget> {
334 Text(
335 '${items.length}/${SeedWidgetState.maxLength}',
336 style: TextStyle(
336 - color: PaletteDark.walletCardText,
337 + color: Theme.of(context).primaryTextTheme.caption.color,
338 fontSize: 14)),
339 SizedBox(width: 10),
340 InkWell(
@@ -346,13 +347,13 @@ class SeedWidgetState extends State<SeedWidget> {
347 padding: EdgeInsets.all(7),
348 decoration: BoxDecoration(
349 color:
349 - PaletteDark.menuList,
350 + Theme.of(context).accentTextTheme.title.backgroundColor,
351 borderRadius:
352 BorderRadius.circular(10.0)),
353 child: Text(
354 S.of(context).paste,
355 style: TextStyle(
355 - color: Colors.white
356 + color: Theme.of(context).primaryTextTheme.title.color
357 ),
358 )),
359 )
@@ -362,17 +363,17 @@ class SeedWidgetState extends State<SeedWidget> {
363 ),
364 hintStyle:
365 TextStyle(
365 - color: PaletteDark.walletCardText,
366 + color: Theme.of(context).primaryTextTheme.caption.color,
367 fontSize: 16
368 ),
369 hintText: S.of(context).restore_from_seed_placeholder,
370 errorText: _errorMessage,
371 focusedBorder: UnderlineInputBorder(
372 borderSide: BorderSide(
372 - color: PaletteDark.menuList, width: 1.0)),
373 + color: Theme.of(context).dividerColor, width: 1.0)),
374 enabledBorder: UnderlineInputBorder(
375 borderSide: BorderSide(
375 - color: PaletteDark.menuList,
376 + color: Theme.of(context).dividerColor,
377 width: 1.0))),
378 enableInteractiveSelection: false,
379 ),
lib/src/widgets/standart_close_button.dart deleted
-16
@@ -1,16 +0,0 @@
1 -import 'package:flutter/material.dart';
2 -import 'package:flutter/cupertino.dart';
3 -
4 -class StandartCloseButton extends StatelessWidget {
5 - @override
6 - Widget build(BuildContext context) {
7 - return SizedBox(
8 - height: 37,
9 - width: 37,
10 - child: FlatButton(
11 - padding: EdgeInsets.all(0),
12 - onPressed: () => Navigator.of(context).pop(),
13 - child: Image.asset('assets/images/close_button.png')),
14 - );
15 - }
16 -}
\ No newline at end of file
lib/src/widgets/standart_list_row.dart
+5 -6
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2
3 class StandartListRow extends StatelessWidget {
4 StandartListRow({this.title, this.value, this.isDrawTop, this.isDrawBottom});
@@ -17,12 +16,12 @@ class StandartListRow extends StatelessWidget {
16 ? Container(
17 width: double.infinity,
18 height: 1,
20 - color: PaletteDark.walletCardTopEndSync,
19 + color: Theme.of(context).dividerColor,
20 )
21 : Offstage(),
22 Container(
23 width: double.infinity,
25 - color: PaletteDark.menuList,
24 + color: Theme.of(context).accentTextTheme.title.backgroundColor,
25 child: Padding(
26 padding: const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
27 child: Column(
@@ -32,7 +31,7 @@ class StandartListRow extends StatelessWidget {
31 style: TextStyle(
32 fontSize: 14,
33 fontWeight: FontWeight.w600,
35 - color: PaletteDark.walletCardText),
34 + color: Theme.of(context).primaryTextTheme.caption.color),
35 textAlign: TextAlign.left),
36 Padding(
37 padding: const EdgeInsets.only(top: 12),
@@ -40,7 +39,7 @@ class StandartListRow extends StatelessWidget {
39 style: TextStyle(
40 fontSize: 16,
41 fontWeight: FontWeight.w600,
43 - color: Colors.white)),
42 + color: Theme.of(context).primaryTextTheme.title.color)),
43 )
44 ]),
45 ),
@@ -49,7 +48,7 @@ class StandartListRow extends StatelessWidget {
48 ? Container(
49 width: double.infinity,
50 height: 1,
52 - color: PaletteDark.walletCardTopEndSync,
51 + color: Theme.of(context).dividerColor,
52 )
53 : Offstage(),
54 ],
lib/src/widgets/standart_switch.dart
+1 -1
@@ -26,7 +26,7 @@ class StandartSwitchState extends State<StandartSwitch> {
26 decoration: BoxDecoration(
27 color: widget.value
28 ? Colors.green
29 - : PaletteDark.mainBackgroundColor,
29 + : PaletteDark.distantBlue,
30 borderRadius: BorderRadius.all(Radius.circular(14.0))),
31 child: Container(
32 width: 24.0,
lib/src/widgets/template_tile.dart
+8 -7
@@ -1,5 +1,4 @@
1 import 'package:flutter/material.dart';
2 -import 'package:cake_wallet/palette.dart';
2
3 class TemplateTile extends StatelessWidget {
4 TemplateTile({
@@ -14,10 +13,12 @@ class TemplateTile extends StatelessWidget {
13 final String from;
14 final VoidCallback onTap;
15
17 - final toIcon = Image.asset('assets/images/to_icon.png');
18 -
16 @override
17 Widget build(BuildContext context) {
18 + final toIcon = Image.asset('assets/images/to_icon.png',
19 + color: Theme.of(context).primaryTextTheme.title.color,
20 + );
21 +
22 return Container(
23 padding: EdgeInsets.only(right: 10),
24 child: GestureDetector(
@@ -27,7 +28,7 @@ class TemplateTile extends StatelessWidget {
28 padding: EdgeInsets.only(left: 24, right: 24),
29 decoration: BoxDecoration(
30 borderRadius: BorderRadius.all(Radius.circular(20)),
30 - color: PaletteDark.menuList
31 + color: Theme.of(context).accentTextTheme.title.backgroundColor
32 ),
33 child: Row(
34 mainAxisAlignment: MainAxisAlignment.start,
@@ -38,7 +39,7 @@ class TemplateTile extends StatelessWidget {
39 style: TextStyle(
40 fontSize: 16,
41 fontWeight: FontWeight.w600,
41 - color: Colors.white
42 + color: Theme.of(context).primaryTextTheme.title.color
43 ),
44 ),
45 Padding(
@@ -48,7 +49,7 @@ class TemplateTile extends StatelessWidget {
49 style: TextStyle(
50 fontSize: 16,
51 fontWeight: FontWeight.w600,
51 - color: Colors.white
52 + color: Theme.of(context).primaryTextTheme.title.color
53 ),
54 ),
55 ),
@@ -63,7 +64,7 @@ class TemplateTile extends StatelessWidget {
64 style: TextStyle(
65 fontSize: 16,
66 fontWeight: FontWeight.w600,
66 - color: Colors.white
67 + color: Theme.of(context).primaryTextTheme.title.color
68 ),
69 ),
70 ),
lib/themes.dart
+79 -123
@@ -7,179 +7,135 @@ class Themes {
7 fontFamily: 'Lato',
8 brightness: Brightness.light,
9 backgroundColor: Colors.white,
10 - scaffoldBackgroundColor: Colors.white,
11 - hintColor: Palette.lightBlue,
12 - focusColor: Palette.lightGrey, // focused and enabled border color for text fields
10 + focusColor: Colors.white, // wallet card border
11 + hintColor: Colors.white, // menu
12 + scaffoldBackgroundColor: Palette.blueAlice, // gradient background start
13 + primaryColor: Palette.lightBlue, // gradient background end
14 + cardColor: Palette.blueAlice,
15 + cardTheme: CardTheme(
16 + color: Colors.white, // synced card start
17 + ),
18 + hoverColor: Colors.white, // synced card end
19 primaryTextTheme: TextTheme(
20 title: TextStyle(
15 - color: Colors.black
21 + color: Palette.oceanBlue, // primary text
22 + backgroundColor: Colors.white // selectButton text
23 ),
24 caption: TextStyle(
18 - color: Colors.black,
25 + color: Palette.lightBlueGrey, // secondary text
26 ),
20 - button: TextStyle(
21 - color: Colors.black,
22 - backgroundColor: Palette.purple, // button purple background color
23 - decorationColor: Palette.deepPink // button pink border color
27 + overline: TextStyle(
28 + color: Palette.lavender // address field in the wallet card
29 + ),
30 + subhead: TextStyle(
31 + color: Colors.white // send, exchange, buy buttons on dashboard page
32 ),
33 headline: TextStyle(
26 - color: Colors.black // account list tile, contact page
34 + color: Palette.lightBlueGrey // historyPanelText
35 ),
28 - subtitle: TextStyle(
29 - color: Palette.wildDarkBlue // filters
36 + display1: TextStyle(
37 + color: Colors.white // menuList
38 ),
31 - subhead: TextStyle(
32 - color: Colors.black // transaction raw, trade raw
39 + display2: TextStyle(
40 + color: Palette.lavender // menuHeader
41 ),
34 - overline: TextStyle(
35 - color: PaletteDark.darkThemeCloseButton // standart list row, transaction details
42 + display3: TextStyle(
43 + color: Palette.lavender // historyPanelButton
44 + ),
45 + display4: TextStyle(
46 + color: Palette.oceanBlue // QR code
47 )
48 ),
38 - toggleButtonsTheme: ToggleButtonsThemeData(
39 - selectedColor: Palette.cakeGreen,
40 - disabledColor: Palette.wildDarkBlue,
41 - color: Palette.switchBackground,
42 - borderColor: Palette.switchBorder
43 - ),
44 - selectedRowColor: Palette.purple,
45 - dividerColor: Palette.lightGrey,
46 - dividerTheme: DividerThemeData(
47 - color: Palette.lightGrey
48 - ),
49 + dividerColor: Palette.periwinkle,
50 accentTextTheme: TextTheme(
51 title: TextStyle(
51 - color: Colors.grey,
52 - backgroundColor: Palette.creamyGrey // pin button color
52 + color: Palette.darkLavender, // top panel
53 + backgroundColor: Palette.lavender, // bottom panel
54 + decorationColor: PaletteDark.distantBlue // select button background color
55 ),
56 caption: TextStyle(
55 - color: Palette.wildDarkBlue, // clear button color, exchange page
56 - backgroundColor: Palette.brightBlue, // button blue background color
57 - decorationColor: Palette.cloudySky // button blue border color
58 - ),
59 - button: TextStyle(
60 - backgroundColor: Palette.indigo, // button indigo background color
61 - decorationColor: Palette.deepIndigo // button indigo border color
57 + color: Palette.blue, // current wallet label
58 + backgroundColor: Colors.white, // gradient start, wallet label
59 + decorationColor: Palette.lavender, // gradient end, wallet label
60 ),
61 subtitle: TextStyle(
64 - color: Colors.black,
65 - backgroundColor: Palette.lightLavender // send page border color
62 + color: Palette.lightBlueGrey, // border color, wallet label
63 + backgroundColor: Palette.lavender, // address field, wallet card
64 + decorationColor: Palette.darkLavender // selected item
65 ),
66 headline: TextStyle(
68 - color: Palette.lightGrey2, // receive page
69 - backgroundColor: Colors.white, // restore button background color
70 - decorationColor: Palette.darkGrey, // restore button border color
71 - ),
72 - subhead: TextStyle(
73 - color: Palette.lightBlue, // restore button description
74 - backgroundColor: Palette.lightGrey2 // change language background color
75 - ),
76 - overline: TextStyle(
77 - color: Palette.nightBlue, // send page text
78 - backgroundColor: Palette.nightBlue, // send page text
79 - decorationColor: Palette.manatee // send page text
67 + color: Palette.darkLavender, // faq background
68 + backgroundColor: Palette.lavender // faq extension
69 )
70 ),
82 - cardColor: Palette.lavender,
83 - cardTheme: CardTheme(
84 - color: Palette.cadetBlue
85 - ),
86 - buttonColor: Palette.darkGrey,
87 - primaryIconTheme: IconThemeData(
88 - color: Colors.white
89 - ),
90 - accentIconTheme: IconThemeData(
91 - color: Colors.white
92 - )
71 );
72
73
74 static final ThemeData darkTheme = ThemeData(
75 fontFamily: 'Lato',
76 brightness: Brightness.dark,
99 - backgroundColor: PaletteDark.darkThemeBackgroundDark,
100 - scaffoldBackgroundColor: PaletteDark.darkThemeBlack,
101 - hintColor: PaletteDark.darkThemeGrey,
102 - focusColor: PaletteDark.darkThemeGreyWithOpacity, // focused and enabled border color for text fields
77 + backgroundColor: PaletteDark.darkNightBlue,
78 + focusColor: PaletteDark.lightDistantBlue, // wallet card border
79 + hintColor: PaletteDark.gray, // menu
80 + scaffoldBackgroundColor: PaletteDark.distantBlue, // gradient background start
81 + primaryColor: PaletteDark.distantBlue, // gradient background end
82 + cardColor: PaletteDark.darkNightBlue,
83 + cardTheme: CardTheme(
84 + color: PaletteDark.moderateBlue, // synced card start
85 + ),
86 + hoverColor: PaletteDark.nightBlue, // synced card end
87 primaryTextTheme: TextTheme(
88 title: TextStyle(
105 - color: PaletteDark.darkThemeTitle
89 + color: Colors.white,
90 + backgroundColor: PaletteDark.moderatePurpleBlue // selectButton text
91 ),
92 caption: TextStyle(
108 - color: Colors.white
93 + color: PaletteDark.gray,
94 ),
110 - button: TextStyle(
111 - color: Palette.wildDarkBlue,
112 - backgroundColor: PaletteDark.darkThemePurpleButton, // button purple background color
113 - decorationColor: PaletteDark.darkThemePurpleButtonBorder // button pink border color
95 + overline: TextStyle(
96 + color: PaletteDark.lightDistantBlue // address field in the wallet card
97 + ),
98 + subhead: TextStyle(
99 + color: PaletteDark.lightDistantBlue // send, exchange, buy buttons on dashboard page
100 ),
101 headline: TextStyle(
116 - color: PaletteDark.darkThemeGrey // account list tile, contact page
102 + color: PaletteDark.pigeonBlue // historyPanelText
103 ),
118 - subtitle: TextStyle(
119 - color: PaletteDark.darkThemeGrey // filters
104 + display1: TextStyle(
105 + color: PaletteDark.lightNightBlue // menuList
106 ),
121 - subhead: TextStyle(
122 - color: Palette.blueGrey // transaction raw, trade raw
107 + display2: TextStyle(
108 + color: PaletteDark.headerNightBlue // menuHeader
109 ),
124 - overline: TextStyle(
125 - color: PaletteDark.darkThemeGrey // standart list row, transaction details
110 + display3: TextStyle(
111 + color: PaletteDark.moderateNightBlue // historyPanelButton
112 + ),
113 + display4: TextStyle(
114 + color: PaletteDark.gray // QR code
115 )
116 ),
128 - toggleButtonsTheme: ToggleButtonsThemeData(
129 - selectedColor: Palette.cakeGreen,
130 - disabledColor: Palette.wildDarkBlue,
131 - color: PaletteDark.switchBackground,
132 - borderColor: PaletteDark.darkThemeMidGrey
133 - ),
134 - selectedRowColor: PaletteDark.darkThemeViolet,
135 - dividerColor: PaletteDark.darkThemeDarkGrey,
136 - dividerTheme: DividerThemeData(
137 - color: PaletteDark.darkThemeGreyWithOpacity
138 - ),
117 + dividerColor: PaletteDark.distantBlue,
118 accentTextTheme: TextTheme(
119 title: TextStyle(
141 - color: PaletteDark.darkThemeTitle,
142 - backgroundColor: PaletteDark.darkThemePinDigitButton // pin button color
120 + color: PaletteDark.moderateBlue, // top panel
121 + backgroundColor: PaletteDark.lightNightBlue, // bottom panel
122 + decorationColor: Colors.white // select button background color
123 ),
124 caption: TextStyle(
145 - color: PaletteDark.darkThemeTitleViolet, // clear button color, exchange page
146 - backgroundColor: PaletteDark.darkThemeBlueButton, // button blue background color
147 - decorationColor: PaletteDark.darkThemeBlueButtonBorder // button blue border color
148 - ),
149 - button: TextStyle(
150 - backgroundColor: PaletteDark.darkThemeIndigoButton, // button indigo background color
151 - decorationColor: PaletteDark.darkThemeIndigoButtonBorder // button indigo border color
125 + color: Colors.white, // current wallet label
126 + backgroundColor: PaletteDark.distantBlue, // gradient start, wallet label
127 + decorationColor: PaletteDark.nightBlue, // gradient end, wallet label
128 ),
129 subtitle: TextStyle(
154 - color: PaletteDark.wildDarkBlueWithOpacity,
155 - backgroundColor: PaletteDark.darkThemeDarkGrey // send page border color
130 + color: PaletteDark.darkNightBlue, // border color, wallet label
131 + backgroundColor: PaletteDark.violetBlue, // address field, wallet card
132 + decorationColor: PaletteDark.headerNightBlue // selected item
133 ),
134 headline: TextStyle(
158 - color: PaletteDark.darkThemeBlack, // receive page
159 - backgroundColor: PaletteDark.darkThemeMidGrey, // restore button background color
160 - decorationColor: PaletteDark.darkThemeDarkGrey, // restore button border color
161 - ),
162 - subhead: TextStyle(
163 - color: Palette.wildDarkBlue, // restore button description
164 - backgroundColor: PaletteDark.darkThemeMidGrey // change language background color
165 - ),
166 - overline: TextStyle(
167 - color: PaletteDark.darkThemeTitle, // send page text
168 - backgroundColor: PaletteDark.darkThemeGrey, // send page text
169 - decorationColor: PaletteDark.darkThemeTitle // send page text
135 + color: PaletteDark.lightNightBlue, // faq background
136 + backgroundColor: PaletteDark.headerNightBlue // faq extension
137 )
138 ),
172 - cardColor: PaletteDark.darkThemeMidGrey,
173 - cardTheme: CardTheme(
174 - color: PaletteDark.darkThemeGrey
175 - ),
176 - buttonColor: PaletteDark.darkThemePinButton,
177 - primaryIconTheme: IconThemeData(
178 - color: PaletteDark.darkThemeViolet
179 - ),
180 - accentIconTheme: IconThemeData(
181 - color: PaletteDark.darkThemeIndigoButtonBorder
182 - )
139 );
140
141 }
\ No newline at end of file