CWA-201 | applied new design to primary button and seed page; added base alert dialog and reconnect alert dialog

Oleksandr Sobol committed Apr 24, 2020 at 20:34 UTC df64e7b5e14b3ad6921af59e56e0c940cf55f13c
19 files changed +402 -176
assets/images/2.0x/crypto_lock.png
Binary files /dev/null and b/assets/images/2.0x/crypto_lock.png differ
assets/images/3.0x/crypto_lock.png
Binary files /dev/null and b/assets/images/3.0x/crypto_lock.png differ
assets/images/crypto_lock.png
Binary files /dev/null and b/assets/images/crypto_lock.png differ
lib/palette.dart
-1
@@ -87,5 +87,4 @@ class PaletteDark {
87 static const Color historyPanelButton = Color.fromRGBO(39, 53, 96, 1.0);
88 static const Color menuHeader = Color.fromRGBO(41, 52, 84, 1.0);
89 static const Color menuList = Color.fromRGBO(48, 59, 95, 1.0);
90 - static const Color menuDivider = Color.fromRGBO(48, 59, 95, 1.0);
90 }
\ No newline at end of file
lib/src/screens/address_book/contact_page.dart
+4 -4
@@ -195,8 +195,8 @@ class ContactFormState extends State<ContactForm> {
195 text: S.of(context).reset,
196 color:
197 Theme.of(context).accentTextTheme.button.backgroundColor,
198 - borderColor:
199 - Theme.of(context).accentTextTheme.button.decorationColor),
198 + textColor:
199 + Theme.of(context).primaryTextTheme.button.color),
200 ),
201 SizedBox(width: 20),
202 Expanded(
@@ -248,10 +248,10 @@ class ContactFormState extends State<ContactForm> {
248 .primaryTextTheme
249 .button
250 .backgroundColor,
251 - borderColor: Theme.of(context)
251 + textColor: Theme.of(context)
252 .primaryTextTheme
253 .button
254 - .decorationColor))
254 + .color))
255 ],
256 ));
257 }
lib/src/screens/base_page.dart
+18 -11
@@ -31,13 +31,16 @@ abstract class BasePage extends StatelessWidget {
31 final _themeChanger = Provider.of<ThemeChanger>(context);
32 Image _closeButton, _backButton;
33
34 - if (_themeChanger.getTheme() == Themes.darkTheme) {
34 + _backButton = _backArrowImageDarkTheme;
35 + _closeButton = _closeButtonImageDarkTheme;
36 +
37 + /*if (_themeChanger.getTheme() == Themes.darkTheme) {
38 _backButton = _backArrowImageDarkTheme;
39 _closeButton = _closeButtonImageDarkTheme;
40 } else {
41 _backButton = _backArrowImage;
42 _closeButton = _closeButtonImage;
40 - }
43 + }*/
44
45 return SizedBox(
46 height: 37,
@@ -60,9 +63,10 @@ abstract class BasePage extends StatelessWidget {
63 : Text(
64 title,
65 style: TextStyle(
63 - fontSize: 16.0,
64 - fontWeight: FontWeight.w600,
65 - color: Theme.of(context).primaryTextTheme.title.color),
66 + fontSize: 22.0,
67 + fontWeight: FontWeight.bold,
68 + color: Colors.white),
69 + //color: Theme.of(context).primaryTextTheme.title.color),
70 );
71 }
72
@@ -81,9 +85,10 @@ abstract class BasePage extends StatelessWidget {
85 leading: leading(context),
86 middle: middle(context),
87 trailing: trailing(context),
84 - backgroundColor: _isDarkTheme
88 + backgroundColor: backgroundColor);
89 + /*backgroundColor: _isDarkTheme
90 ? Theme.of(context).backgroundColor
86 - : backgroundColor);
91 + : backgroundColor);*/
92
93 case AppBarStyle.withShadow:
94 return NavBar.withShadow(
@@ -91,9 +96,10 @@ abstract class BasePage extends StatelessWidget {
96 leading: leading(context),
97 middle: middle(context),
98 trailing: trailing(context),
94 - backgroundColor: _isDarkTheme
99 + backgroundColor: backgroundColor);
100 + /*backgroundColor: _isDarkTheme
101 ? Theme.of(context).backgroundColor
96 - : backgroundColor);
102 + : backgroundColor);*/
103
104 default:
105 return NavBar(
@@ -101,9 +107,10 @@ abstract class BasePage extends StatelessWidget {
107 leading: leading(context),
108 middle: middle(context),
109 trailing: trailing(context),
104 - backgroundColor: _isDarkTheme
110 + backgroundColor: backgroundColor);
111 + /*backgroundColor: _isDarkTheme
112 ? Theme.of(context).backgroundColor
106 - : backgroundColor);
113 + : backgroundColor);*/
114 }
115 }
116
lib/src/screens/dashboard/wallet_menu.dart
+15 -2
@@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
4 import 'package:cake_wallet/generated/i18n.dart';
5 import 'package:cake_wallet/src/stores/wallet/wallet_store.dart';
6 import 'package:cake_wallet/src/screens/auth/auth_page.dart';
7 +import 'package:cake_wallet/src/screens/dashboard/widgets/reconnect_alert_dialog.dart';
8
9 class WalletMenu {
10 WalletMenu(this.context);
@@ -74,7 +75,19 @@ class WalletMenu {
75 await showDialog<void>(
76 context: context,
77 builder: (BuildContext context) {
77 - return AlertDialog(
78 + return ReconnectAlertDialog(
79 + reconnectTitleText: S.of(context).reconnection,
80 + reconnectContentText: S.of(context).reconnect_alert_text,
81 + reconnectLeftActionButtonText: S.of(context).ok,
82 + reconnectRightActionButtonText: S.of(context).cancel,
83 + reconnectActionLeft: () {
84 + walletStore.reconnect();
85 + Navigator.of(context).pop();
86 + },
87 + reconnectActionRight: () => Navigator.of(context).pop()
88 + );
89 +
90 + /*AlertDialog(
91 title: Text(
92 S.of(context).reconnection,
93 textAlign: TextAlign.center,
@@ -91,7 +104,7 @@ class WalletMenu {
104 },
105 child: Text(S.of(context).ok))
106 ],
94 - );
107 + );*/
108 });
109 }
110 }
lib/src/screens/dashboard/widgets/reconnect_alert_dialog.dart new
+34
@@ -0,0 +1,34 @@
1 +import 'dart:ui';
2 +import 'package:cake_wallet/src/widgets/base_alert_dialog.dart';
3 +import 'package:flutter/cupertino.dart';
4 +
5 +class ReconnectAlertDialog extends BaseAlertDialog {
6 + ReconnectAlertDialog({
7 + @required this.reconnectTitleText,
8 + @required this.reconnectContentText,
9 + @required this.reconnectLeftActionButtonText,
10 + @required this.reconnectRightActionButtonText,
11 + @required this.reconnectActionLeft,
12 + @required this.reconnectActionRight
13 + });
14 +
15 + final String reconnectTitleText;
16 + final String reconnectContentText;
17 + final String reconnectLeftActionButtonText;
18 + final String reconnectRightActionButtonText;
19 + final VoidCallback reconnectActionLeft;
20 + final VoidCallback reconnectActionRight;
21 +
22 + @override
23 + String get titleText => reconnectTitleText;
24 + @override
25 + String get contentText => reconnectContentText;
26 + @override
27 + String get leftActionButtonText => reconnectLeftActionButtonText;
28 + @override
29 + String get rightActionButtonText => reconnectRightActionButtonText;
30 + @override
31 + VoidCallback get actionLeft => reconnectActionLeft;
32 + @override
33 + VoidCallback get actionRight => reconnectActionRight;
34 +}
\ No newline at end of file
lib/src/screens/disclaimer/disclaimer_page.dart
+2 -2
@@ -311,10 +311,10 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
311 .primaryTextTheme
312 .button
313 .backgroundColor,
314 - borderColor: Theme.of(context)
314 + textColor: Theme.of(context)
315 .primaryTextTheme
316 .button
317 - .decorationColor,
317 + .color,
318 ),
319 )
320 : Offstage(),
lib/src/screens/exchange_trade/exchange_confirm_page.dart
+6 -6
@@ -69,10 +69,10 @@ class ExchangeConfirmPage extends BasePage {
69 .accentTextTheme
70 .caption
71 .backgroundColor,
72 - borderColor: Theme.of(context)
73 - .accentTextTheme
74 - .caption
75 - .decorationColor)
72 + textColor: Theme.of(context)
73 + .primaryTextTheme
74 + .button
75 + .color)
76 ],
77 ),
78 ))),
@@ -83,8 +83,8 @@ class ExchangeConfirmPage extends BasePage {
83 .pushReplacementNamed(Routes.exchangeTrade, arguments: trade),
84 text: S.of(context).saved_the_trade_id,
85 color: Theme.of(context).primaryTextTheme.button.backgroundColor,
86 - borderColor:
87 - Theme.of(context).primaryTextTheme.button.decorationColor),
86 + textColor:
87 + Theme.of(context).primaryTextTheme.button.color),
88 )
89 ],
90 );
lib/src/screens/nodes/new_node_page.dart
+5 -5
@@ -173,10 +173,10 @@ class NewNodeFormState extends State<NewNodePageForm> {
173 .accentTextTheme
174 .button
175 .backgroundColor,
176 - borderColor: Theme.of(context)
177 - .accentTextTheme
176 + textColor: Theme.of(context)
177 + .primaryTextTheme
178 .button
179 - .decorationColor),
179 + .color),
180 )),
181 Flexible(
182 child: Container(
@@ -200,10 +200,10 @@ class NewNodeFormState extends State<NewNodePageForm> {
200 .primaryTextTheme
201 .button
202 .backgroundColor,
203 - borderColor: Theme.of(context)
203 + textColor: Theme.of(context)
204 .primaryTextTheme
205 .button
206 - .decorationColor,
206 + .color,
207 ),
208 )),
209 ],
lib/src/screens/seed/seed_page.dart
+120 -122
@@ -9,14 +9,15 @@ import 'package:cake_wallet/generated/i18n.dart';
9 import 'package:cake_wallet/src/widgets/primary_button.dart';
10 import 'package:cake_wallet/src/stores/wallet_seed/wallet_seed_store.dart';
11 import 'package:cake_wallet/src/screens/base_page.dart';
12 +import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
13
14 class SeedPage extends BasePage {
15 SeedPage({this.onCloseCallback});
16
16 - static final image = Image.asset('assets/images/seed_image.png');
17 + static final image = Image.asset('assets/images/crypto_lock.png');
18
19 @override
19 - bool get isModalBackButton => true;
20 + Color get backgroundColor => PaletteDark.historyPanel;
21
22 @override
23 String get title => S.current.seed_title;
@@ -32,135 +33,132 @@ class SeedPage extends BasePage {
33 return onCloseCallback != null ? Offstage() : super.leading(context);
34 }
35
36 + @override
37 + Widget trailing(BuildContext context) {
38 + return onCloseCallback != null
39 + ? GestureDetector(
40 + onTap: () => onClose(context),
41 + child: Container(
42 + width: 70,
43 + height: 32,
44 + decoration: BoxDecoration(
45 + borderRadius: BorderRadius.all(Radius.circular(16)),
46 + color: PaletteDark.menuList
47 + ),
48 + child: Text(
49 + S.of(context).seed_language_next,
50 + style: TextStyle(
51 + fontSize: 14,
52 + fontWeight: FontWeight.w600,
53 + color: Colors.blue
54 + ),
55 + ),
56 + ),
57 + )
58 + : Offstage();
59 + }
60 +
61 @override
62 Widget body(BuildContext context) {
63 final walletSeedStore = Provider.of<WalletSeedStore>(context);
64 String _seed;
65
66 return Container(
41 - padding: EdgeInsets.all(30.0),
42 - child: Column(
43 - children: <Widget>[
44 - Expanded(
45 - child: Center(
46 - child: Column(
47 - mainAxisSize: MainAxisSize.min,
48 - children: <Widget>[
49 - image,
50 - Container(
51 - margin: EdgeInsets.only(left: 30.0, top: 10.0, right: 30.0),
52 - child: Observer(builder: (_) {
53 - _seed = walletSeedStore.seed;
54 - return Column(
55 - children: <Widget>[
56 - Row(
57 - children: <Widget>[
58 - Expanded(
59 - child: Container(
60 - decoration: BoxDecoration(
61 - border: Border(
62 - bottom: BorderSide(
63 - width: 1.0,
64 - color: Theme.of(context)
65 - .dividerColor))),
66 - padding: EdgeInsets.only(bottom: 20.0),
67 - margin: EdgeInsets.only(bottom: 10.0),
68 - child: Text(
69 - walletSeedStore.name,
70 - textAlign: TextAlign.center,
71 - style: TextStyle(
72 - fontSize: 18.0,
73 - color: Theme.of(context)
74 - .primaryTextTheme
75 - .button
76 - .color),
77 - ),
78 - ))
79 - ],
80 - ),
81 - SizedBox(
82 - height: 10.0,
67 + width: double.infinity,
68 + height: double.infinity,
69 + color: PaletteDark.historyPanel,
70 + child: ScrollableWithBottomSection(
71 + contentPadding: EdgeInsets.only(left: 40, right: 40, bottom: 20),
72 + content: Column(
73 + children: <Widget>[
74 + Padding(
75 + padding: EdgeInsets.only(top: 33),
76 + child: image,
77 + ),
78 + Padding(
79 + padding: EdgeInsets.only(top: 33),
80 + child: Observer(
81 + builder: (_) {
82 + _seed = walletSeedStore.seed;
83 +
84 + return Column(
85 + crossAxisAlignment: CrossAxisAlignment.center,
86 + children: <Widget>[
87 + Text(
88 + walletSeedStore.name,
89 + style: TextStyle(
90 + fontSize: 20,
91 + fontWeight: FontWeight.bold,
92 + color: Colors.white
93 + ),
94 + ),
95 + Padding(
96 + padding: EdgeInsets.only(top: 20),
97 + child: Text(
98 + _seed,
99 + textAlign: TextAlign.center,
100 + style: TextStyle(
101 + fontSize: 14,
102 + color: PaletteDark.walletCardText
103 ),
84 - Text(
85 - walletSeedStore.seed,
86 - textAlign: TextAlign.center,
87 - style: TextStyle(
88 - fontSize: 14.0,
89 - color: Theme.of(context)
90 - .primaryTextTheme
91 - .title
92 - .color),
93 - )
94 - ],
95 - );
96 - }),
97 - ),
98 - Container(
99 - margin: EdgeInsets.only(top: 30.0),
100 - child: Row(
101 - children: <Widget>[
102 - Flexible(
103 - child: Container(
104 - padding: EdgeInsets.only(right: 8.0),
105 - child: PrimaryButton(
106 - onPressed: () => Share.text(
107 - S.of(context).seed_share,
108 - _seed,
109 - 'text/plain'),
110 - color: Theme.of(context)
111 - .primaryTextTheme
112 - .button
113 - .backgroundColor,
114 - borderColor: Theme.of(context)
115 - .primaryTextTheme
116 - .button
117 - .decorationColor,
118 - text: S.of(context).save),
119 - )),
120 - Flexible(
121 - child: Container(
122 - padding: EdgeInsets.only(left: 8.0),
123 - child: Builder(
124 - builder: (context) => PrimaryButton(
125 - onPressed: () {
126 - Clipboard.setData(
127 - ClipboardData(text: _seed));
128 - Scaffold.of(context).showSnackBar(
129 - SnackBar(
130 - content: Text(S
131 - .of(context)
132 - .copied_to_clipboard),
133 - backgroundColor: Colors.green,
134 - duration:
135 - Duration(milliseconds: 1500),
136 - ),
137 - );
138 - },
139 - text: S.of(context).copy,
140 - color: Theme.of(context)
141 - .accentTextTheme
142 - .caption
143 - .backgroundColor,
144 - borderColor: Theme.of(context)
145 - .accentTextTheme
146 - .caption
147 - .decorationColor),
148 - )))
149 - ],
150 - ),
151 - )
152 - ],
104 + ),
105 + )
106 + ],
107 + );
108 + }
109 ),
154 - ),
110 + )
111 + ],
112 + ),
113 + bottomSectionPadding: EdgeInsets.only(
114 + left: 24,
115 + right: 24,
116 + bottom: 52
117 + ),
118 + bottomSection: Container(
119 + child: Row(
120 + mainAxisSize: MainAxisSize.max,
121 + children: <Widget>[
122 + Flexible(
123 + child: Container(
124 + padding: EdgeInsets.only(right: 8.0),
125 + child: PrimaryButton(
126 + onPressed: () => Share.text(
127 + S.of(context).seed_share,
128 + _seed,
129 + 'text/plain'),
130 + text: S.of(context).save,
131 + color: Colors.green,
132 + textColor: Colors.white),
133 + )
134 + ),
135 + Flexible(
136 + child: Container(
137 + padding: EdgeInsets.only(left: 8.0),
138 + child: Builder(
139 + builder: (context) => PrimaryButton(
140 + onPressed: () {
141 + Clipboard.setData(
142 + ClipboardData(text: _seed));
143 + Scaffold.of(context).showSnackBar(
144 + SnackBar(
145 + content: Text(S
146 + .of(context)
147 + .copied_to_clipboard),
148 + backgroundColor: Colors.green,
149 + duration: Duration(milliseconds: 1500),
150 + ),
151 + );
152 + },
153 + text: S.of(context).copy,
154 + color: Colors.blue,
155 + textColor: Colors.white)
156 + ),
157 + )
158 + )
159 + ],
160 ),
156 - onCloseCallback != null
157 - ? PrimaryButton(
158 - onPressed: () => onClose(context),
159 - text: S.of(context).restore_next,
160 - color: Palette.darkGrey,
161 - borderColor: Palette.darkGrey)
162 - : Offstage()
163 - ],
161 + ),
162 ),
163 );
164 }
lib/src/screens/seed_language/seed_language_page.dart
+2 -2
@@ -43,8 +43,8 @@ class SeedLanguage extends BasePage {
43 text: S.of(context).seed_language_next,
44 color:
45 Theme.of(context).primaryTextTheme.button.backgroundColor,
46 - borderColor:
47 - Theme.of(context).primaryTextTheme.button.decorationColor),
46 + textColor:
47 + Theme.of(context).primaryTextTheme.button.color),
48 ],
49 ),
50 );
lib/src/screens/wallet_list/wallet_list_page.dart
+3 -3
@@ -16,7 +16,7 @@ import 'package:cake_wallet/src/screens/wallet_list/widgets/wallet_tile.dart';
16 class WalletListPage extends BasePage {
17
18 @override
19 - ObstructingPreferredSizeWidget appBar(BuildContext context) => null;
19 + Color get backgroundColor => PaletteDark.historyPanel;
20
21 @override
22 Widget body(BuildContext context) => WalletListBody();
@@ -30,7 +30,7 @@ class WalletListBody extends StatefulWidget {
30 class WalletListBodyState extends State<WalletListBody> {
31 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,);
33 + final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', height: 12, width: 12, color: Colors.white);
34 WalletListStore _walletListStore;
35 ScrollController scrollController = ScrollController();
36
@@ -41,7 +41,7 @@ class WalletListBodyState extends State<WalletListBody> {
41
42 return SafeArea(
43 child: Container(
44 - padding: EdgeInsets.only(top: 32),
44 + padding: EdgeInsets.only(top: 16),
45 color: PaletteDark.historyPanel,
46 child: ScrollableWithBottomSection(
47 contentPadding: EdgeInsets.only(bottom: 20),
lib/src/screens/welcome/welcome_page.dart
+4 -4
@@ -77,16 +77,16 @@ class WelcomePage extends BasePage {
77 text: S.of(context).create_new,
78 color:
79 Theme.of(context).primaryTextTheme.button.backgroundColor,
80 - borderColor:
81 - Theme.of(context).primaryTextTheme.button.decorationColor),
80 + textColor:
81 + Theme.of(context).primaryTextTheme.button.color),
82 SizedBox(height: 10),
83 PrimaryButton(
84 onPressed: () {
85 Navigator.pushNamed(context, Routes.restoreOptions);
86 },
87 color: Theme.of(context).accentTextTheme.caption.backgroundColor,
88 - borderColor:
89 - Theme.of(context).accentTextTheme.caption.decorationColor,
88 + textColor:
89 + Theme.of(context).primaryTextTheme.button.color,
90 text: S.of(context).restore_wallet,
91 )
92 ]))
lib/src/widgets/base_alert_dialog.dart new
+169
@@ -0,0 +1,169 @@
1 +import 'dart:ui';
2 +import 'package:flutter/material.dart';
3 +import 'package:cake_wallet/palette.dart';
4 +
5 +class BaseAlertDialog extends StatelessWidget {
6 + String get titleText => '';
7 + String get contentText => '';
8 + String get leftActionButtonText => '';
9 + String get rightActionButtonText => '';
10 + VoidCallback get actionLeft => () {};
11 + VoidCallback get actionRight => () {};
12 +
13 + Widget title(BuildContext context) {
14 + return Text(
15 + titleText,
16 + textAlign: TextAlign.center,
17 + style: TextStyle(
18 + fontSize: 20,
19 + fontWeight: FontWeight.w600,
20 + color: Colors.white,
21 + decoration: TextDecoration.none,
22 + ),
23 + );
24 + }
25 +
26 + Widget content(BuildContext context) {
27 + return Text(
28 + contentText,
29 + textAlign: TextAlign.center,
30 + style: TextStyle(
31 + fontSize: 16,
32 + fontWeight: FontWeight.w600,
33 + color: Colors.white,
34 + decoration: TextDecoration.none,
35 + ),
36 + );
37 + }
38 +
39 + Widget actionButtons(BuildContext context) {
40 + return Container(
41 + width: 300,
42 + height: 52,
43 + decoration: BoxDecoration(
44 + borderRadius: BorderRadius.only(
45 + bottomLeft: Radius.circular(24),
46 + bottomRight: Radius.circular(24)
47 + ),
48 + color: Colors.white
49 + ),
50 + child: Row(
51 + mainAxisSize: MainAxisSize.max,
52 + children: <Widget>[
53 + Flexible(
54 + child: Container(
55 + padding: EdgeInsets.only(left: 12, right: 12),
56 + decoration: BoxDecoration(
57 + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24)),
58 + ),
59 + child: ButtonTheme(
60 + minWidth: double.infinity,
61 + child: FlatButton(
62 + onPressed: actionLeft,
63 + highlightColor: Colors.transparent,
64 + splashColor: Colors.transparent,
65 + child: Text(
66 + leftActionButtonText,
67 + textAlign: TextAlign.center,
68 + style: TextStyle(
69 + fontSize: 15,
70 + fontWeight: FontWeight.w600,
71 + color: Colors.blue,
72 + decoration: TextDecoration.none,
73 + ),
74 + )),
75 + ),
76 + )
77 + ),
78 + Flexible(
79 + child: Container(
80 + padding: EdgeInsets.only(left: 12, right: 12),
81 + decoration: BoxDecoration(
82 + borderRadius: BorderRadius.only(bottomRight: Radius.circular(24)),
83 + ),
84 + child: ButtonTheme(
85 + minWidth: double.infinity,
86 + child: FlatButton(
87 + onPressed: actionRight,
88 + highlightColor: Colors.transparent,
89 + splashColor: Colors.transparent,
90 + child: Text(
91 + rightActionButtonText,
92 + textAlign: TextAlign.center,
93 + style: TextStyle(
94 + fontSize: 15,
95 + fontWeight: FontWeight.w600,
96 + color: Colors.red,
97 + decoration: TextDecoration.none,
98 + ),
99 + )),
100 + ),
101 + )
102 + )
103 + ],
104 + ),
105 + );
106 + }
107 +
108 + @override
109 + Widget build(BuildContext context) {
110 + return GestureDetector(
111 + onTap: () => Navigator.of(context).pop(),
112 + child: Container(
113 + color: Colors.transparent,
114 + child: BackdropFilter(
115 + filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
116 + child: Container(
117 + decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
118 + child: Center(
119 + child: GestureDetector(
120 + onTap: () => null,
121 + child: Container(
122 + width: 300,
123 + height: 257,
124 + decoration: BoxDecoration(
125 + borderRadius: BorderRadius.all(Radius.circular(24)),
126 + color: PaletteDark.menuHeader
127 + ),
128 + child: Column(
129 + //mainAxisSize: MainAxisSize.max,
130 + children: <Widget>[
131 + Container(
132 + width: 300,
133 + height: 77,
134 + padding: EdgeInsets.all(24),
135 + decoration: BoxDecoration(
136 + borderRadius: BorderRadius.only(
137 + topLeft: Radius.circular(24),
138 + topRight: Radius.circular(24)
139 + ),
140 + ),
141 + child: Center(
142 + child: title(context),
143 + ),
144 + ),
145 + Container(
146 + width: 300,
147 + height: 1,
148 + color: PaletteDark.menuList,
149 + ),
150 + Container(
151 + width: 300,
152 + height: 127,
153 + padding: EdgeInsets.all(24),
154 + child: Center(
155 + child: content(context),
156 + ),
157 + ),
158 + actionButtons(context)
159 + ],
160 + ),
161 + ),
162 + ),
163 + ),
164 + ),
165 + ),
166 + ),
167 + );
168 + }
169 +}
\ No newline at end of file
lib/src/widgets/nav_bar.dart
+6 -4
@@ -19,8 +19,9 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
19 middle: middle,
20 trailing: trailing,
21 height: _height,
22 - backgroundColor:
23 - _isDarkTheme ? Theme.of(context).backgroundColor : backgroundColor);
22 + backgroundColor: backgroundColor);
23 + /*backgroundColor:
24 + _isDarkTheme ? Theme.of(context).backgroundColor : backgroundColor);*/
25 }
26
27 factory NavBar.withShadow(
@@ -37,8 +38,9 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
38 middle: middle,
39 trailing: trailing,
40 height: 80,
40 - backgroundColor:
41 - _isDarkTheme ? Theme.of(context).backgroundColor : backgroundColor,
41 + backgroundColor: backgroundColor,
42 + /*backgroundColor:
43 + _isDarkTheme ? Theme.of(context).backgroundColor : backgroundColor,*/
44 decoration: BoxDecoration(
45 color: _isDarkTheme
46 ? Theme.of(context).backgroundColor
lib/src/widgets/primary_button.dart
+8 -7
@@ -7,14 +7,14 @@ class PrimaryButton extends StatelessWidget {
7 {@required this.onPressed,
8 @required this.text,
9 @required this.color,
10 - @required this.borderColor,
10 + @required this.textColor,
11 this.isDisabled = false,
12 this.onDisabledPressed});
13
14 final VoidCallback onPressed;
15 final VoidCallback onDisabledPressed;
16 final Color color;
17 - final Color borderColor;
17 + final Color textColor;
18 final String text;
19 final bool isDisabled;
20
@@ -22,21 +22,21 @@ class PrimaryButton extends StatelessWidget {
22 Widget build(BuildContext context) {
23 return ButtonTheme(
24 minWidth: double.infinity,
25 - height: 56.0,
25 + height: 52.0,
26 child: FlatButton(
27 onPressed: isDisabled
28 ? (onDisabledPressed != null ? onDisabledPressed : null)
29 : onPressed,
30 color: isDisabled ? Colors.transparent : color,
31 shape: RoundedRectangleBorder(
32 - side: BorderSide(color: borderColor),
33 - borderRadius: BorderRadius.circular(10.0)),
32 + borderRadius: BorderRadius.circular(26.0)),
33 child: Text(text,
34 style: TextStyle(
36 - fontSize: 16.0,
35 + fontSize: 15.0,
36 + fontWeight: FontWeight.w600,
37 color: isDisabled
38 ? Palette.darkGrey
39 - : Theme.of(context).primaryTextTheme.button.color)),
39 + : textColor)),
40 ));
41 }
42 }
@@ -172,6 +172,7 @@ class PrimaryImageButton extends StatelessWidget {
172 text,
173 style: TextStyle(
174 fontSize: 15,
175 + fontWeight: FontWeight.w600,
176 color: textColor
177 ),
178 )
lib/src/widgets/seed_widget.dart
+6 -3
@@ -337,10 +337,10 @@ class SeedWidgetState extends State<SeedWidget> {
337 .primaryTextTheme
338 .button
339 .backgroundColor,
340 - borderColor: Theme.of(context)
340 + textColor: Theme.of(context)
341 .primaryTextTheme
342 .button
343 - .decorationColor)
343 + .color)
344 : PrimaryButton(
345 text: selectedItem != null
346 ? S.of(context).save
@@ -351,7 +351,10 @@ class SeedWidgetState extends State<SeedWidget> {
351 onDisabledPressed: () => showErrorIfExist(),
352 isDisabled: !isCurrentMnemoticValid,
353 color: PaletteDark.darkThemeBlueButton,
354 - borderColor: Palette.brightBlue))
354 + textColor: Theme.of(context)
355 + .primaryTextTheme
356 + .button
357 + .color))
358 ]))
359 ]),
360 );