From 27dce3118d06c55fa2ea18daeed347396f342761 Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Wed, 19 Aug 2020 20:57:06 +0300 Subject: [PATCH] CAKE-20 | applied light theme to dashboard, receive, monero_account_list, monero_account_edit_or_create, address_edit_or_create, trade_details, transaction_details and base pages --- assets/images/2.0x/bitcoin_menu.png | Bin 0 -> 2395 bytes assets/images/3.0x/bitcoin_menu.png | Bin 0 -> 3469 bytes assets/images/bitcoin_menu.png | Bin 0 -> 1269 bytes lib/palette.dart | 17 ++ lib/src/screens/base_page.dart | 27 +- lib/src/screens/dashboard/dashboard_page.dart | 20 +- .../dashboard/widgets/action_button.dart | 3 +- .../dashboard/widgets/address_page.dart | 7 +- .../dashboard/widgets/balance_page.dart | 5 +- .../dashboard/widgets/date_section_raw.dart | 3 +- .../screens/dashboard/widgets/header_row.dart | 49 +++- .../dashboard/widgets/menu_widget.dart | 21 +- .../dashboard/widgets/sync_indicator.dart | 21 +- .../screens/dashboard/widgets/trade_row.dart | 4 +- .../dashboard/widgets/transaction_raw.dart | 9 +- .../dashboard/widgets/transactions_page.dart | 5 +- .../monero_account_edit_or_create_page.dart | 8 - .../monero_account_list_page.dart | 10 +- .../monero_accounts/widgets/account_tile.dart | 9 +- lib/src/screens/receive/receive_page.dart | 37 ++- .../screens/receive/widgets/header_tile.dart | 9 +- .../screens/receive/widgets/qr_widget.dart | 11 +- .../address_edit_or_create_page.dart | 8 - .../trade_details/trade_details_page.dart | 8 +- .../transaction_details_page.dart | 8 +- lib/src/widgets/base_text_form_field.dart | 9 +- lib/src/widgets/cake_scrollbar.dart | 5 +- lib/src/widgets/primary_button.dart | 5 +- lib/src/widgets/standart_list_row.dart | 31 +- lib/themes.dart | 277 +++++++++++++----- 30 files changed, 399 insertions(+), 227 deletions(-) create mode 100644 assets/images/2.0x/bitcoin_menu.png create mode 100644 assets/images/3.0x/bitcoin_menu.png create mode 100644 assets/images/bitcoin_menu.png diff --git a/assets/images/2.0x/bitcoin_menu.png b/assets/images/2.0x/bitcoin_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..7afe772aa4307ec935bc4469f798d5bcc0a64074 GIT binary patch literal 2395 zcmV-h38eOkP)YLXAiWYjqK+&tE*qA*m9W*a-nmh~V}zJi37z zQ44{m{(X;0d(009d~1VSh&A32;qRB>cVlo2X9SA1X;4Ezd~D0ob_YcoA^6qr{|=5| zoxnM9?4y1H_tsVt6anG$i|}X!mSL5^Q~!FP&^vF=;)-D3BCQa}R@aHK^^#Ap2OkG+ z-ckJQx9~WEJ)vMvJoT?nV)Wj8MC1tu2Yk*yhPRJlPgJ(R)Yk>6ultChM;F218B|0i z0%gc*RM!O9g--w+yifimeOzTo?@VAqp7-j*ohYh;qIaYZcO`Kr0zX~y=GdLY(gc3` zR zA8xcj&TWOfM${AuY?q(QkGbrFML=Eu4EszsXmi^4a?_i+1R8$>GywY;#WM5=p77%v zOe`piW&dXoi|oGy7H4x*XQ#P%Pn4#-H*$wCBKQRM!52P$5gd#4$n8pA`@z5Ndf;{0 zghb}=>O4|2{_kI{-!4BF#oKsJhd@;4JQBv)`pX)DY<)vlA&b)bb@sIv;VPkd*x>(` z4|oL5ft?w)WI_#>UtJr*Y<*5`;Y0zz-W)$%0bBJSG@Klp!i*}t8i`ga4)20CRw$5wr%*h*ZH$fOPClZhcv zP7oT%I&^M8{2mH*pYMk3->x|u`135de{&k%|5S!dp7A3l@f$}Zwr3o(nsbzY_yqgV z04Ng>XOZ<~913-jXe4B^WxgyTQo<%p@e^O2)GMvQRs4D|tzJR`@qM+Yb}K#~93VTSG%D#x1s z0te7aJyJY~A3_7z)&K1WbW#q`pgJn)46Pe``@faHRhVNtG7@6$l=u;-9XQ!G?8^DS z1k!C)bc`z_;ZedC*iihp&1y_%DViZX+EVYB64J0ttD39SP6%vK+SFYqiu|7-RizjD z;g7%k@j%6KM;>d>i+=t2+foyQDU3N38L&<%D8Z_l;SxzJwmm%>YIFiO7Cuv*)6br1+U)aolg~VjS zDL4+$nH93HVGG21!V0_jZvqxIi)+|Kg+Y5&AamC;QjgX3N@l2@D6=$`g<7J4q&!4= zYoA?}_6#Z&m#fYo{rxtxlp@> z7pxQjS4sFeq$&P!TuE7JtBOjVfHlcm;xwoNq(Isxs9gPG%Ej$c3uBO6DKW|1VKNau znOk;6aNeV6rVrC! z!lgp6l6d3TSP{YNI#!HtgTrR2DaV*!$%DoGD|J@BI|1uxj!=hb>J<}c>dlK(j)!rf zvRe(*ljd(}T;d<;ZyB0U10+*%mgD35X3*N(+xVAT`A#7em3kPnU$e0QT42aa)_6F; zsvxo=XKBDI7fS^eU!60D@C)zs-3K4i#vM zvPG;F0_EgSgZq&yE0iw%<>#hmvC>wOL$GP=W@601Cpbv6rkHOBi$}?Ou0gmikFDu} zVuh~y>ay!UX0p6t2^!ZM$f1$Gojg!<>G#(%pEUy0maxiu2yFcN9RHVXtBW(sAX0&~ z_PTW*HWl!573s_HSfcDPSOi=3G^;qTw$)LzHVZe@x08jWx|<648;eRF#ZN5PR0r$> z2OJAdMcQY7azj+$|LB8gJD$$AjL3~O5owWS>Z=I@+tD_`HBr_fx7TYT&HF$0%foH) zX`z%VP2PNGLue=qW1&d;ZS#B56z?fhSe4_U9A=lFI)<^(rpc3QF0&y|A%R9TBz^31 z-NlCoiew|6GDm*i_GAqXwmq5S^Ts>t*ts6}dF!WD?A+Rst^hi$d17%2xt1#AC7;~` z4TLxjphq52SXDyXyQH4h9U9x=V-HA=b&w|z>;fx23F#J~=Z<#zunrM6I6Zq}Ljkwi z)FIYb-^%eSph#LwQnADeEO*5ukmg1Oc=7=eIc3#*)FS=d_O|g(2%MvNizL~5|H=h% zb2ue%4%y2<3P(`WR`8njJH@5PtOD)=wGg+F}B>zZPsNAHvQGt$j>yxpM{{STpbo*RQ9A*Fj N002ovPDHLkV1fZ1e=-07 literal 0 HcmV?d00001 diff --git a/assets/images/3.0x/bitcoin_menu.png b/assets/images/3.0x/bitcoin_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..a278fa2a5f19bc463a9143ea0fa159e605a38636 GIT binary patch literal 3469 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 literal 0 HcmV?d00001 diff --git a/assets/images/bitcoin_menu.png b/assets/images/bitcoin_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..ed0ea0048d2d3fb364ebc5771784498e9504485e GIT binary patch literal 1269 zcmV;hky}3lg}0i?ykK* zL+AlCX}oY&!xYql5Z_eDXo4c1E_|TGd+(h`y1ldr7R20w*mEGzCE7`F?%Xc8l>^2r z)&+`E1ouB@`k}2=E5U!9jsJ|Rb_A)vbkE)%t8FAGTbiJ?;BK``h6Qcy=VjLzbpHOUS=}hj(Bmyu8@qq(^Yy*xA ztT{@!bSD?@+{p>A(g`o$MM6myE)p2nWgGc^?R*-8S%_i>#r;BA@+EJb0L*kpNKu95 zZ$A&VL0KL^vgVh)kJI>@l$AKS#XG?=>^7YMJG-o&rg6`|s; zEL&;3;qk|80=E7R0mNvDFL>D&OJ^_!jtJ?m>Jzb@Ohh~;9Emw7N?vhs4Vqv9k~s^? zfE*e=Lq7yEd0Du0ZqL}!B%aACuA9!=xqB;f*&1U5@k=R@Owbc4QdliBxzpmOIK}KY z9DI50tj4uTJ1adz1>T(Kej@5yogqdDCuWo;W z|GjfLO}5AS%$?N?4B{;m1bd-wf9#z%yn0(m;cL_VL(X|N(i<=Y^1$Dr$NggIPEX2G zt{(^AtMyH4`O@7u>_{%?V<%3s17ke4zj%NC?(0X2FsLh&Yj^4~!J{Tn2m43FPNLf( zQ!s1pv~7uhHJ>$i*3~%QvdM=d1MxZAs0hM_)h zaM0B>YP)^K6kjN1ol0OWwV&w2LBpw0T=KQRZMWH_Nykydc6gOS;w*s$N!WD3>4KRj z=Z=`E8MZ^evw40>EJO^5$Cj$M5Tu1Tcpk|3-y5ylSk8A~t$vRiD1Qu^sy?>N-tUhiAn0%2{X5z$( z=ALp1ZxU;R@|@q_NeYA3vMZi2lD|#&4-?gVWc28v;#_-z*(wrfX*Kp%pC$i2|8S~= z`97j$k8O}}R#iy{sSn;3xjZkx9OddiA<1-@r)kX1n8@=UPgW^sbz_TIs zC1rB$Os~3HnkLall7%qM5)|0+3FKRpUYVTZMg*&vd$*@VSo{luMtr)Apz?2s; Colors.white; - Color get backgroundDarkColor => PaletteDark.darkNightBlue; + Color get backgroundDarkColor => PaletteDark.backgroundColor; + + Color get titleColor => null; bool get resizeToAvoidBottomPadding => true; @@ -27,11 +29,6 @@ abstract class BasePage extends StatelessWidget { final GlobalKey _scaffoldKey = GlobalKey(); - final _backArrowImage = Image.asset('assets/images/back_arrow.png', - color: Colors.white); - final _backArrowImageDarkTheme = - Image.asset('assets/images/back_arrow_dark_theme.png', - color: Colors.white); final _closeButtonImage = Image.asset('assets/images/close_button.png'); final _closeButtonImageDarkTheme = Image.asset('assets/images/close_button_dark_theme.png'); @@ -45,16 +42,13 @@ abstract class BasePage extends StatelessWidget { return null; } - final _themeChanger = Provider.of(context); - Image _closeButton, _backButton; + final _backButton = Image.asset('assets/images/back_arrow.png', + color: titleColor ?? Theme.of(context).primaryTextTheme.title.color); - if (_themeChanger.getTheme() == Themes.darkTheme) { - _backButton = _backArrowImageDarkTheme; - _closeButton = _closeButtonImageDarkTheme; - } else { - _backButton = _backArrowImage; - _closeButton = _closeButtonImage; - } + final _themeChanger = Provider.of(context); + final _closeButton = _themeChanger.getTheme() == Themes.darkTheme + ? _closeButtonImageDarkTheme + : _closeButtonImage; return SizedBox( height: 37, @@ -79,7 +73,8 @@ abstract class BasePage extends StatelessWidget { style: TextStyle( fontSize: 18.0, fontWeight: FontWeight.bold, - color: Colors.white), + color: titleColor ?? + Theme.of(context).primaryTextTheme.title.color), ); } diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 2c0a02319..495d58cec 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -5,7 +5,6 @@ import 'package:flutter/cupertino.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/menu_widget.dart'; -import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/action_button.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/balance_page.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/address_page.dart'; @@ -21,10 +20,23 @@ class DashboardPage extends BasePage { }); @override - Color get backgroundLightColor => PaletteDark.backgroundColor; + Color get backgroundLightColor => Colors.transparent; @override - Color get backgroundDarkColor => PaletteDark.backgroundColor; + Color get backgroundDarkColor => Colors.transparent; + + @override + Widget Function(BuildContext, Widget) get rootWrapper => + (BuildContext context, Widget scaffold) => Container( + decoration: BoxDecoration( + gradient: LinearGradient(colors: [ + Theme.of(context).accentColor, + Theme.of(context).scaffoldBackgroundColor, + Theme.of(context).primaryColor, + ], + begin: Alignment.topRight, + end: Alignment.bottomLeft)), + child: scaffold); @override bool get resizeToAvoidBottomPadding => false; @@ -101,7 +113,7 @@ class DashboardPage extends BasePage { radius: 6.0, dotWidth: 6.0, dotHeight: 6.0, - dotColor: PaletteDark.cyanBlue, + dotColor: Theme.of(context).indicatorColor, activeDotColor: Colors.white ), ) diff --git a/lib/src/screens/dashboard/widgets/action_button.dart b/lib/src/screens/dashboard/widgets/action_button.dart index a42c4ec8c..4ab08d97e 100644 --- a/lib/src/screens/dashboard/widgets/action_button.dart +++ b/lib/src/screens/dashboard/widgets/action_button.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:cake_wallet/palette.dart'; class ActionButton extends StatelessWidget{ ActionButton({ @@ -36,7 +35,7 @@ class ActionButton extends StatelessWidget{ width: 60, alignment: Alignment.center, decoration: BoxDecoration( - color: PaletteDark.nightBlue, + color: Theme.of(context).buttonColor, shape: BoxShape.circle), child: image, ), diff --git a/lib/src/screens/dashboard/widgets/address_page.dart b/lib/src/screens/dashboard/widgets/address_page.dart index 35134d51b..c50b1b566 100644 --- a/lib/src/screens/dashboard/widgets/address_page.dart +++ b/lib/src/screens/dashboard/widgets/address_page.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; -import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/screens/receive/widgets/qr_widget.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -29,7 +28,11 @@ class AddressPage extends StatelessWidget { alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(25)), - color: PaletteDark.nightBlue + border: Border.all( + color: Theme.of(context).textTheme.subhead.color, + width: 1 + ), + color: Theme.of(context).buttonColor ), child: Row( mainAxisSize: MainAxisSize.max, diff --git a/lib/src/screens/dashboard/widgets/balance_page.dart b/lib/src/screens/dashboard/widgets/balance_page.dart index 9cca31a31..4cd3fe2a0 100644 --- a/lib/src/screens/dashboard/widgets/balance_page.dart +++ b/lib/src/screens/dashboard/widgets/balance_page.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; -import 'package:cake_wallet/palette.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; class BalancePage extends StatelessWidget { @@ -26,7 +25,7 @@ class BalancePage extends StatelessWidget { style: TextStyle( fontSize: 40, fontWeight: FontWeight.bold, - color: PaletteDark.cyanBlue, + color: Theme.of(context).indicatorColor, height: 1 ), ); @@ -52,7 +51,7 @@ class BalancePage extends StatelessWidget { style: TextStyle( fontSize: 18, fontWeight: FontWeight.w500, - color: PaletteDark.cyanBlue, + color: Theme.of(context).indicatorColor, height: 1 ), ); diff --git a/lib/src/screens/dashboard/widgets/date_section_raw.dart b/lib/src/screens/dashboard/widgets/date_section_raw.dart index 61a6a64de..a69268a21 100644 --- a/lib/src/screens/dashboard/widgets/date_section_raw.dart +++ b/lib/src/screens/dashboard/widgets/date_section_raw.dart @@ -3,7 +3,6 @@ import 'package:intl/intl.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:provider/provider.dart'; import 'package:cake_wallet/src/stores/settings/settings_store.dart'; -import 'package:cake_wallet/palette.dart'; class DateSectionRaw extends StatelessWidget { DateSectionRaw({this.date}); @@ -42,7 +41,7 @@ class DateSectionRaw extends StatelessWidget { child: Text(title, style: TextStyle( fontSize: 12, - color: PaletteDark.darkCyanBlue + color: Theme.of(context).textTheme.overline.backgroundColor )) ); } diff --git a/lib/src/screens/dashboard/widgets/header_row.dart b/lib/src/screens/dashboard/widgets/header_row.dart index 837c23e6f..7542e7371 100644 --- a/lib/src/screens/dashboard/widgets/header_row.dart +++ b/lib/src/screens/dashboard/widgets/header_row.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/src/domain/exchange/exchange_provider_description.dart'; @@ -11,11 +10,11 @@ class HeaderRow extends StatelessWidget { final DashboardViewModel dashboardViewModel; - final filterIcon = Image.asset('assets/images/filter_icon.png', - color: PaletteDark.wildBlue); - @override Widget build(BuildContext context) { + final filterIcon = Image.asset('assets/images/filter_icon.png', + color: Theme.of(context).textTheme.caption.decorationColor); + return Container( height: 52, color: Colors.transparent, @@ -40,7 +39,7 @@ class HeaderRow extends StatelessWidget { child: Text(S.of(context).transactions, style: TextStyle( fontWeight: FontWeight.bold, - color: Theme.of(context).primaryTextTheme.caption.color))), + color: Theme.of(context).primaryTextTheme.title.color))), PopupMenuItem( value: 0, child: Observer( @@ -49,7 +48,11 @@ class HeaderRow extends StatelessWidget { MainAxisAlignment .spaceBetween, children: [ - Text(S.of(context).incoming), + Text(S.of(context).incoming, + style: TextStyle( + color: Theme.of(context).primaryTextTheme.title.color + ), + ), Checkbox( value: dashboardViewModel .transactionFilterStore @@ -67,7 +70,11 @@ class HeaderRow extends StatelessWidget { MainAxisAlignment .spaceBetween, children: [ - Text(S.of(context).outgoing), + Text(S.of(context).outgoing, + style: TextStyle( + color: Theme.of(context).primaryTextTheme.title.color + ) + ), Checkbox( value: dashboardViewModel .transactionFilterStore @@ -80,7 +87,11 @@ class HeaderRow extends StatelessWidget { PopupMenuItem( value: 2, child: - Text(S.of(context).transactions_by_date)), + Text(S.of(context).transactions_by_date, + style: TextStyle( + color: Theme.of(context).primaryTextTheme.title.color + ) + )), PopupMenuDivider(), PopupMenuItem( enabled: false, @@ -88,7 +99,7 @@ class HeaderRow extends StatelessWidget { child: Text(S.of(context).trades, style: TextStyle( fontWeight: FontWeight.bold, - color: Theme.of(context).primaryTextTheme.caption.color))), + color: Theme.of(context).primaryTextTheme.title.color))), PopupMenuItem( value: 3, child: Observer( @@ -97,7 +108,11 @@ class HeaderRow extends StatelessWidget { MainAxisAlignment .spaceBetween, children: [ - Text('XMR.TO'), + Text('XMR.TO', + style: TextStyle( + color: Theme.of(context).primaryTextTheme.title.color + ) + ), Checkbox( value: dashboardViewModel .tradeFilterStore @@ -117,7 +132,11 @@ class HeaderRow extends StatelessWidget { MainAxisAlignment .spaceBetween, children: [ - Text('Change.NOW'), + Text('Change.NOW', + style: TextStyle( + color: Theme.of(context).primaryTextTheme.title.color + ) + ), Checkbox( value: dashboardViewModel .tradeFilterStore @@ -137,7 +156,11 @@ class HeaderRow extends StatelessWidget { MainAxisAlignment .spaceBetween, children: [ - Text('MorphToken'), + Text('MorphToken', + style: TextStyle( + color: Theme.of(context).primaryTextTheme.title.color + ) + ), Checkbox( value: dashboardViewModel .tradeFilterStore @@ -155,7 +178,7 @@ class HeaderRow extends StatelessWidget { width: 36, decoration: BoxDecoration( shape: BoxShape.circle, - color: PaletteDark.oceanBlue + color: Theme.of(context).textTheme.overline.color ), child: filterIcon, ), diff --git a/lib/src/screens/dashboard/widgets/menu_widget.dart b/lib/src/screens/dashboard/widgets/menu_widget.dart index 505e09dab..834026779 100644 --- a/lib/src/screens/dashboard/widgets/menu_widget.dart +++ b/lib/src/screens/dashboard/widgets/menu_widget.dart @@ -17,7 +17,7 @@ class MenuWidget extends StatefulWidget { class MenuWidgetState extends State { final moneroIcon = Image.asset('assets/images/monero_menu.png'); - final bitcoinIcon = Image.asset('assets/images/bitcoin.png'); + final bitcoinIcon = Image.asset('assets/images/bitcoin_menu.png'); final largeScreen = 731; double menuWidth; @@ -81,7 +81,7 @@ class MenuWidgetState extends State { width: 4, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(2)), - color: Theme.of(context).hintColor), + color: PaletteDark.gray), )), SizedBox(width: 12), Expanded( @@ -92,12 +92,13 @@ class MenuWidgetState extends State { child: Container( width: menuWidth, height: double.infinity, - color: PaletteDark.deepPurpleBlue, + color: Theme.of(context).textTheme.body2.decorationColor, child: SingleChildScrollView( child: Column( children: [ Container( height: headerHeight, + color: Theme.of(context).textTheme.body2.color, padding: EdgeInsets.only( left: 24, top: fromTopEdge, @@ -120,7 +121,8 @@ class MenuWidgetState extends State { Text( widget.name, style: TextStyle( - color: Colors.white, + color: Theme.of(context).textTheme + .display2.color, fontSize: 16, fontWeight: FontWeight.bold), ), @@ -128,7 +130,9 @@ class MenuWidgetState extends State { Text( widget.subname, style: TextStyle( - color: PaletteDark.darkCyanBlue, + color: Theme.of(context) + .primaryTextTheme + .caption.color, fontWeight: FontWeight.w500, fontSize: 12), ) @@ -140,7 +144,7 @@ class MenuWidgetState extends State { ), Container( height: 1, - color: PaletteDark.darkOceanBlue, + color: Theme.of(context).primaryTextTheme.caption.decorationColor, ), ListView.separated( shrinkWrap: true, @@ -178,7 +182,8 @@ class MenuWidgetState extends State { child: Text( item, style: TextStyle( - color: Colors.white, + color: Theme.of(context).textTheme + .display2.color, fontSize: 16, fontWeight: FontWeight.bold), )) @@ -189,7 +194,7 @@ class MenuWidgetState extends State { }, separatorBuilder: (_, index) => Container( height: 1, - color: PaletteDark.darkOceanBlue, + color: Theme.of(context).primaryTextTheme.caption.decorationColor, ), itemCount: itemCount) ], diff --git a/lib/src/screens/dashboard/widgets/sync_indicator.dart b/lib/src/screens/dashboard/widgets/sync_indicator.dart index 64b8575c1..f0a0fac08 100644 --- a/lib/src/screens/dashboard/widgets/sync_indicator.dart +++ b/lib/src/screens/dashboard/widgets/sync_indicator.dart @@ -13,35 +13,36 @@ class SyncIndicator extends StatelessWidget { Widget build(BuildContext context) { return Observer( builder: (_) { - final syncIndicatorWidth = 250.0; + final syncIndicatorWidth = 237.0; final status = dashboardViewModel.status; - final statusText = status.title(); - final progress = status.progress(); + final statusText = status != null ? status.title() : ''; + final progress = status != null ? status.progress() : 0.0; final indicatorOffset = progress * syncIndicatorWidth; - final indicatorWidth = - progress <= 1 ? syncIndicatorWidth - indicatorOffset : 0.0; + final indicatorWidth = progress < 1 + ? indicatorOffset > 0 ? indicatorOffset : 0.0 + : syncIndicatorWidth; final indicatorColor = status is SyncedSyncStatus ? PaletteDark.brightGreen - : PaletteDark.orangeYellow; + : Theme.of(context).textTheme.caption.color; return ClipRRect( borderRadius: BorderRadius.all(Radius.circular(15)), child: Container( height: 30, width: syncIndicatorWidth, - color: PaletteDark.lightNightBlue, + color: Theme.of(context).textTheme.title.decorationColor, child: Stack( alignment: Alignment.center, children: [ progress <= 1 ? Positioned( - left: indicatorOffset, + left: 0, top: 0, bottom: 0, child: Container( width: indicatorWidth, height: 30, - color: PaletteDark.oceanBlue, + color: Theme.of(context).textTheme.title.backgroundColor, ) ) : Offstage(), @@ -70,7 +71,7 @@ class SyncIndicator extends StatelessWidget { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: PaletteDark.wildBlue + color: Theme.of(context).textTheme.title.color ), ), ) diff --git a/lib/src/screens/dashboard/widgets/trade_row.dart b/lib/src/screens/dashboard/widgets/trade_row.dart index 8a7bc7daf..6da7a798f 100644 --- a/lib/src/screens/dashboard/widgets/trade_row.dart +++ b/lib/src/screens/dashboard/widgets/trade_row.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/src/domain/common/crypto_currency.dart'; import 'package:cake_wallet/src/domain/exchange/exchange_provider_description.dart'; -import 'package:cake_wallet/palette.dart'; class TradeRow extends StatelessWidget { TradeRow({ @@ -66,7 +65,8 @@ class TradeRow extends StatelessWidget { Text(createdAtFormattedDate, style: TextStyle( fontSize: 14, - color: PaletteDark.darkCyanBlue)) + color: Theme.of(context).textTheme + .overline.backgroundColor)) ]), ], ), diff --git a/lib/src/screens/dashboard/widgets/transaction_raw.dart b/lib/src/screens/dashboard/widgets/transaction_raw.dart index 0d41b42a6..625e8028b 100644 --- a/lib/src/screens/dashboard/widgets/transaction_raw.dart +++ b/lib/src/screens/dashboard/widgets/transaction_raw.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/domain/common/transaction_direction.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -35,7 +34,7 @@ class TransactionRow extends StatelessWidget { width: 36, decoration: BoxDecoration( shape: BoxShape.circle, - color: PaletteDark.wildNightBlue + color: Theme.of(context).textTheme.overline.decorationColor ), child: Image.asset( direction == TransactionDirection.incoming @@ -79,13 +78,15 @@ class TransactionRow extends StatelessWidget { Text(formattedDate, style: TextStyle( fontSize: 14, - color: PaletteDark.darkCyanBlue)), + color: Theme.of(context).textTheme + .overline.backgroundColor)), Text(direction == TransactionDirection.incoming ? formattedFiatAmount : '- ' + formattedFiatAmount, style: TextStyle( fontSize: 14, - color: PaletteDark.darkCyanBlue)) + color: Theme.of(context).textTheme + .overline.backgroundColor)) ]), ], ), diff --git a/lib/src/screens/dashboard/widgets/transactions_page.dart b/lib/src/screens/dashboard/widgets/transactions_page.dart index d6cbf0ae5..15b2eedaa 100644 --- a/lib/src/screens/dashboard/widgets/transactions_page.dart +++ b/lib/src/screens/dashboard/widgets/transactions_page.dart @@ -75,7 +75,7 @@ class TransactionsPage extends StatelessWidget { } return Container( - color: Theme.of(context).backgroundColor, + color: Colors.transparent, height: 1); } ) @@ -84,7 +84,8 @@ class TransactionsPage extends StatelessWidget { S.of(context).placeholder_transactions, style: TextStyle( fontSize: 14, - color: Colors.grey + color: Theme.of(context).primaryTextTheme + .overline.decorationColor ), ), ); diff --git a/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart b/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart index 7cd1b200a..ca2b65359 100644 --- a/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart +++ b/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart @@ -8,7 +8,6 @@ import 'package:cake_wallet/view_model/monero_account_list/monero_account_edit_o import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; -import 'package:cake_wallet/palette.dart'; class MoneroAccountEditOrCreatePage extends BasePage { MoneroAccountEditOrCreatePage({@required this.moneroAccountCreationViewModel}) @@ -24,12 +23,6 @@ class MoneroAccountEditOrCreatePage extends BasePage { @override String get title => S.current.account; - @override - Color get backgroundLightColor => PaletteDark.backgroundColor; - - @override - Color get backgroundDarkColor => PaletteDark.backgroundColor; - final GlobalKey _formKey; final TextEditingController _textController; @@ -45,7 +38,6 @@ class MoneroAccountEditOrCreatePage extends BasePage { child: Center( child: BaseTextFormField( controller: _textController, - textColor: Colors.white, hintText: S.of(context).account, validator: MoneroLabelValidator(), ))), diff --git a/lib/src/screens/monero_accounts/monero_account_list_page.dart b/lib/src/screens/monero_accounts/monero_account_list_page.dart index c59e566d1..8c3a5503e 100644 --- a/lib/src/screens/monero_accounts/monero_account_list_page.dart +++ b/lib/src/screens/monero_accounts/monero_account_list_page.dart @@ -64,7 +64,7 @@ class MoneroAccountListPage extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(14)), child: Container( height: 296, - color: PaletteDark.deepPurpleBlue, + color: Theme.of(context).textTheme.display4.decorationColor, child: Column( children: [ Expanded( @@ -83,7 +83,7 @@ class MoneroAccountListPage extends StatelessWidget { separatorBuilder: (context, index) => Container( height: 1, - color: PaletteDark.dividerColor, + color: Theme.of(context).dividerColor, ), itemCount: accounts.length ?? 0, itemBuilder: (context, index) { @@ -121,7 +121,7 @@ class MoneroAccountListPage extends StatelessWidget { .pushNamed(Routes.accountCreation), child: Container( height: 62, - color: Colors.white, + color: Theme.of(context).textTheme.subtitle.decorationColor, padding: EdgeInsets.only(left: 24, right: 24), child: Center( child: Row( @@ -129,7 +129,7 @@ class MoneroAccountListPage extends StatelessWidget { children: [ Icon( Icons.add, - color: PaletteDark.darkNightBlue, + color: Colors.white, ), Padding( padding: EdgeInsets.only(left: 5), @@ -138,7 +138,7 @@ class MoneroAccountListPage extends StatelessWidget { style: TextStyle( fontSize: 15, fontWeight: FontWeight.w600, - color: PaletteDark.darkNightBlue, + color: Colors.white, decoration: TextDecoration.none, ), ), diff --git a/lib/src/screens/monero_accounts/widgets/account_tile.dart b/lib/src/screens/monero_accounts/widgets/account_tile.dart index a9f131f1c..5782ce8e4 100644 --- a/lib/src/screens/monero_accounts/widgets/account_tile.dart +++ b/lib/src/screens/monero_accounts/widgets/account_tile.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:cake_wallet/palette.dart'; class AccountTile extends StatelessWidget { AccountTile({ @@ -14,8 +13,12 @@ class AccountTile extends StatelessWidget { @override Widget build(BuildContext context) { - final color = isCurrent ? PaletteDark.lightOceanBlue : Colors.transparent; - final textColor = isCurrent ? Colors.blue : Colors.white; + final color = isCurrent + ? Theme.of(context).textTheme.subtitle.decorationColor + : Theme.of(context).textTheme.display4.decorationColor; + final textColor = isCurrent + ? Theme.of(context).textTheme.subtitle.color + : Theme.of(context).textTheme.display4.color; return GestureDetector( onTap: onTap, diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart index 21e8e3b5e..fbae17324 100644 --- a/lib/src/screens/receive/receive_page.dart +++ b/lib/src/screens/receive/receive_page.dart @@ -14,7 +14,6 @@ import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_h import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_item.dart'; import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; import 'package:cake_wallet/src/screens/receive/widgets/qr_widget.dart'; -import 'package:cake_wallet/palette.dart'; class ReceivePage extends BasePage { ReceivePage({this.addressListViewModel}); @@ -25,10 +24,26 @@ class ReceivePage extends BasePage { String get title => S.current.receive; @override - Color get backgroundLightColor => PaletteDark.backgroundColor; + Color get backgroundLightColor => Colors.transparent; @override - Color get backgroundDarkColor => PaletteDark.backgroundColor; + Color get backgroundDarkColor => Colors.transparent; + + @override + Color get titleColor => Colors.white; + + @override + Widget Function(BuildContext, Widget) get rootWrapper => + (BuildContext context, Widget scaffold) => Container( + decoration: BoxDecoration( + gradient: LinearGradient(colors: [ + Theme.of(context).accentColor, + Theme.of(context).scaffoldBackgroundColor, + Theme.of(context).primaryColor, + ], + begin: Alignment.topRight, + end: Alignment.bottomLeft)), + child: scaffold); @override Widget trailing(BuildContext context) { @@ -66,7 +81,9 @@ class ReceivePage extends BasePage { Observer( builder: (_) => ListView.separated( separatorBuilder: (context, _) => - Container(height: 1, color: PaletteDark.dividerColor), + Container( + height: 1, + color: Theme.of(context).dividerColor), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemCount: addressListViewModel.items.length, @@ -83,7 +100,7 @@ class ReceivePage extends BasePage { icon: Icon( Icons.arrow_forward_ios, size: 14, - color: Colors.white, + color: Theme.of(context).textTheme.display1.color, )); } @@ -95,7 +112,7 @@ class ReceivePage extends BasePage { icon: Icon( Icons.add, size: 20, - color: Colors.white, + color: Theme.of(context).textTheme.display1.color, )); } @@ -105,11 +122,11 @@ class ReceivePage extends BasePage { final isCurrent = item.address == addressListViewModel.address.address; final backgroundColor = isCurrent - ? PaletteDark.lightOceanBlue - : PaletteDark.nightBlue; + ? Theme.of(context).textTheme.display3.decorationColor + : Theme.of(context).textTheme.display2.decorationColor; final textColor = isCurrent - ? Colors.blue - : Colors.white; + ? Theme.of(context).textTheme.display3.color + : Theme.of(context).textTheme.display2.color; return AddressCell.fromItem(item, isCurrent: isCurrent, diff --git a/lib/src/screens/receive/widgets/header_tile.dart b/lib/src/screens/receive/widgets/header_tile.dart index effb7349e..167cde582 100644 --- a/lib/src/screens/receive/widgets/header_tile.dart +++ b/lib/src/screens/receive/widgets/header_tile.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:cake_wallet/palette.dart'; class HeaderTile extends StatelessWidget { HeaderTile({ @@ -23,7 +22,7 @@ class HeaderTile extends StatelessWidget { top: 24, bottom: 24 ), - color: PaletteDark.nightBlue, + color: Theme.of(context).textTheme.display2.decorationColor, child: Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -32,8 +31,8 @@ class HeaderTile extends StatelessWidget { title, style: TextStyle( fontSize: 18, - fontWeight: FontWeight.w500, - color: Colors.white + fontWeight: FontWeight.w600, + color: Theme.of(context).textTheme.display2.color ), ), Container( @@ -41,7 +40,7 @@ class HeaderTile extends StatelessWidget { width: 32, decoration: BoxDecoration( shape: BoxShape.circle, - color: PaletteDark.distantNightBlue + color: Theme.of(context).textTheme.display1.decorationColor ), child: icon, ) diff --git a/lib/src/screens/receive/widgets/qr_widget.dart b/lib/src/screens/receive/widgets/qr_widget.dart index 7b6474847..3a30db535 100644 --- a/lib/src/screens/receive/widgets/qr_widget.dart +++ b/lib/src/screens/receive/widgets/qr_widget.dart @@ -7,7 +7,6 @@ import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart'; import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; import 'package:cake_wallet/core/amount_validator.dart'; import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; -import 'package:cake_wallet/palette.dart'; class QRWidget extends StatelessWidget { QRWidget({ @@ -27,7 +26,7 @@ class QRWidget extends StatelessWidget { @override Widget build(BuildContext context) { final copyImage = Image.asset('assets/images/copy_address.png', - color: PaletteDark.lightBlueGrey); + color: Theme.of(context).textTheme.subhead.decorationColor); final addressTopOffset = isAmountFieldShow ? 60.0 : 40.0; return Column( @@ -45,7 +44,7 @@ class QRWidget extends StatelessWidget { child: QrImage( data: addressListViewModel.uri.toString(), backgroundColor: Colors.transparent, - foregroundColor: PaletteDark.lightBlueGrey, + foregroundColor: Theme.of(context).textTheme.headline.color, ))))), Spacer(flex: 3) ]), @@ -56,7 +55,7 @@ class QRWidget extends StatelessWidget { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: PaletteDark.cyanBlue + color: Theme.of(context).indicatorColor ), ), ), @@ -79,14 +78,14 @@ class QRWidget extends StatelessWidget { textAlign: TextAlign.center, hintText: S.of(context).receive_amount, textColor: Colors.white, - borderColor: PaletteDark.darkGrey, + borderColor: Theme.of(context).textTheme.headline.decorationColor, validator: AmountValidator( type: addressListViewModel.type, isAutovalidate: true ), autovalidate: true, placeholderTextStyle: TextStyle( - color: PaletteDark.cyanBlue, + color: Theme.of(context).hoverColor, fontSize: 18, fontWeight: FontWeight.w500)))) ], diff --git a/lib/src/screens/subaddress/address_edit_or_create_page.dart b/lib/src/screens/subaddress/address_edit_or_create_page.dart index 77eacab88..84c492196 100644 --- a/lib/src/screens/subaddress/address_edit_or_create_page.dart +++ b/lib/src/screens/subaddress/address_edit_or_create_page.dart @@ -8,7 +8,6 @@ import 'package:cake_wallet/core/address_label_validator.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/palette.dart'; class AddressEditOrCreatePage extends BasePage { AddressEditOrCreatePage({@required this.addressEditOrCreateViewModel}) @@ -29,12 +28,6 @@ class AddressEditOrCreatePage extends BasePage { @override String get title => S.current.new_subaddress_title; - @override - Color get backgroundLightColor => PaletteDark.backgroundColor; - - @override - Color get backgroundDarkColor => PaletteDark.backgroundColor; - @override Widget body(BuildContext context) { reaction((_) => addressEditOrCreateViewModel.state, @@ -55,7 +48,6 @@ class AddressEditOrCreatePage extends BasePage { child: Center( child: BaseTextFormField( controller: _labelController, - textColor: Colors.white, hintText: S.of(context).new_subaddress_label_name, validator: AddressLabelValidator()))), Observer( diff --git a/lib/src/screens/trade_details/trade_details_page.dart b/lib/src/screens/trade_details/trade_details_page.dart index e750694dc..52b85b873 100644 --- a/lib/src/screens/trade_details/trade_details_page.dart +++ b/lib/src/screens/trade_details/trade_details_page.dart @@ -24,7 +24,6 @@ class TradeDetailsPage extends BasePage { formatDefault: "dd.MM.yyyy, HH:mm"); return Container( - padding: EdgeInsets.only(top: 20, bottom: 20), child: Observer(builder: (_) { final trade = exchangeStore.trade; final items = [ @@ -59,17 +58,15 @@ class TradeDetailsPage extends BasePage { separatorBuilder: (_, __) => Container( height: 1, padding: EdgeInsets.only(left: 24), - color: Theme.of(context).accentTextTheme.title.backgroundColor, + color: Theme.of(context).backgroundColor, child: Container( height: 1, - color: Theme.of(context).dividerColor, + color: Theme.of(context).primaryTextTheme.title.backgroundColor, ), ), itemCount: items.length, itemBuilder: (BuildContext context, int index) { final item = items[index]; - - final isDrawTop = index == 0 ? true : false; final isDrawBottom = index == items.length - 1 ? true : false; return GestureDetector( @@ -87,7 +84,6 @@ class TradeDetailsPage extends BasePage { child: StandartListRow( title: '${item.title}', value: '${item.value}', - isDrawTop: isDrawTop, isDrawBottom: isDrawBottom, )); }); diff --git a/lib/src/screens/transaction_details/transaction_details_page.dart b/lib/src/screens/transaction_details/transaction_details_page.dart index 4351089ed..bed01d5ee 100644 --- a/lib/src/screens/transaction_details/transaction_details_page.dart +++ b/lib/src/screens/transaction_details/transaction_details_page.dart @@ -69,22 +69,19 @@ class TransactionDetailsPage extends BasePage { @override Widget body(BuildContext context) { return Container( - padding: EdgeInsets.only(top: 20, bottom: 20), child: ListView.separated( separatorBuilder: (context, index) => Container( height: 1, padding: EdgeInsets.only(left: 24), - color: Theme.of(context).accentTextTheme.title.backgroundColor, + color: Theme.of(context).backgroundColor, child: Container( height: 1, - color: Theme.of(context).dividerColor, + color: Theme.of(context).primaryTextTheme.title.backgroundColor, ), ), itemCount: _items.length, itemBuilder: (context, index) { final item = _items[index]; - - final isDrawTop = index == 0 ? true : false; final isDrawBottom = index == _items.length - 1 ? true : false; return GestureDetector( @@ -102,7 +99,6 @@ class TransactionDetailsPage extends BasePage { child: StandartListRow( title: '${item.title}:', value: item.value, - isDrawTop: isDrawTop, isDrawBottom: isDrawBottom), ); }), diff --git a/lib/src/widgets/base_text_form_field.dart b/lib/src/widgets/base_text_form_field.dart index b3931a92d..21ae78cc5 100644 --- a/lib/src/widgets/base_text_form_field.dart +++ b/lib/src/widgets/base_text_form_field.dart @@ -64,21 +64,20 @@ class BaseTextFormField extends StatelessWidget { suffixIcon: suffixIcon, hintStyle: placeholderTextStyle ?? TextStyle( - color: hintColor ?? - Theme.of(context).primaryTextTheme.caption.color, + color: hintColor ?? Theme.of(context).hintColor, fontSize: 16), hintText: hintText, focusedBorder: UnderlineInputBorder( borderSide: BorderSide( - color: borderColor ?? Theme.of(context).dividerColor, + color: borderColor ?? Theme.of(context).primaryTextTheme.title.backgroundColor, width: 1.0)), disabledBorder: UnderlineInputBorder( borderSide: BorderSide( - color: borderColor ?? Theme.of(context).dividerColor, + color: borderColor ?? Theme.of(context).primaryTextTheme.title.backgroundColor, width: 1.0)), enabledBorder: UnderlineInputBorder( borderSide: BorderSide( - color: borderColor ?? Theme.of(context).dividerColor, + color: borderColor ?? Theme.of(context).primaryTextTheme.title.backgroundColor, width: 1.0))), validator: validator, ); diff --git a/lib/src/widgets/cake_scrollbar.dart b/lib/src/widgets/cake_scrollbar.dart index 6258e5f0b..90b571c9e 100644 --- a/lib/src/widgets/cake_scrollbar.dart +++ b/lib/src/widgets/cake_scrollbar.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:cake_wallet/palette.dart'; class CakeScrollbar extends StatelessWidget { CakeScrollbar({ @@ -20,7 +19,7 @@ class CakeScrollbar extends StatelessWidget { height: backgroundHeight, width: 6, decoration: BoxDecoration( - color: PaletteDark.violetBlue, + color: Theme.of(context).textTheme.body1.decorationColor, borderRadius: BorderRadius.all(Radius.circular(3)) ), child: Stack( @@ -32,7 +31,7 @@ class CakeScrollbar extends StatelessWidget { height: thumbHeight, width: 6.0, decoration: BoxDecoration( - color: PaletteDark.wildBlueGrey, + color: Theme.of(context).textTheme.body1.color, borderRadius: BorderRadius.all(Radius.circular(3)) ), ), diff --git a/lib/src/widgets/primary_button.dart b/lib/src/widgets/primary_button.dart index a5f2e8315..929bcd895 100644 --- a/lib/src/widgets/primary_button.dart +++ b/lib/src/widgets/primary_button.dart @@ -1,6 +1,5 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:cake_wallet/palette.dart'; class PrimaryButton extends StatelessWidget { const PrimaryButton( @@ -38,7 +37,7 @@ class PrimaryButton extends StatelessWidget { fontSize: 15.0, fontWeight: FontWeight.w600, color: isDisabled - ? Colors.grey.withOpacity(0.5) + ? textColor.withOpacity(0.5) : textColor)), )); } @@ -78,7 +77,7 @@ class LoadingPrimaryButton extends StatelessWidget { fontSize: 15.0, fontWeight: FontWeight.w600, color: isDisabled - ? Colors.grey.withOpacity(0.5) + ? textColor.withOpacity(0.5) : textColor )), )); diff --git a/lib/src/widgets/standart_list_row.dart b/lib/src/widgets/standart_list_row.dart index ca6797911..d573e6e5f 100644 --- a/lib/src/widgets/standart_list_row.dart +++ b/lib/src/widgets/standart_list_row.dart @@ -4,28 +4,19 @@ class StandartListRow extends StatelessWidget { StandartListRow( {this.title, this.value, - this.isDrawTop = false, this.isDrawBottom = false}); final String title; final String value; - final bool isDrawTop; final bool isDrawBottom; @override Widget build(BuildContext context) { return Column( children: [ - isDrawTop - ? Container( - width: double.infinity, - height: 1, - color: Theme.of(context).dividerColor, - ) - : Offstage(), Container( width: double.infinity, - color: Theme.of(context).accentTextTheme.title.backgroundColor, + color: Theme.of(context).backgroundColor, child: Padding( padding: const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24), @@ -35,9 +26,9 @@ class StandartListRow extends StatelessWidget { Text(title, style: TextStyle( fontSize: 14, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w500, color: - Theme.of(context).primaryTextTheme.caption.color), + Theme.of(context).primaryTextTheme.overline.color), textAlign: TextAlign.left), Padding( padding: const EdgeInsets.only(top: 12), @@ -54,12 +45,16 @@ class StandartListRow extends StatelessWidget { ), ), isDrawBottom - ? Container( - width: double.infinity, - height: 1, - color: Theme.of(context).dividerColor, - ) - : Offstage(), + ? Container( + height: 1, + padding: EdgeInsets.only(left: 24), + color: Theme.of(context).backgroundColor, + child: Container( + height: 1, + color: Theme.of(context).primaryTextTheme.title.backgroundColor, + ), + ) + : Offstage(), ], ); } diff --git a/lib/themes.dart b/lib/themes.dart index a0b3d19c7..f3d25b4f1 100644 --- a/lib/themes.dart +++ b/lib/themes.dart @@ -7,47 +7,113 @@ class Themes { fontFamily: 'Poppins', brightness: Brightness.light, backgroundColor: Colors.white, + accentColor: Palette.blueCraiola, // first gradient color + scaffoldBackgroundColor: Palette.pinkFlamingo, // second gradient color + primaryColor: Palette.redHat, // third gradient color + buttonColor: Colors.white.withOpacity(0.2), // action buttons on dashboard page + indicatorColor: Colors.white.withOpacity(0.5), // page indicator + hoverColor: Colors.white, // amount hint text (receive page) + dividerColor: Palette.paleBlue, + hintColor: Palette.gray, + textTheme: TextTheme( + title: TextStyle( + color: Colors.white, // sync_indicator text + backgroundColor: Colors.white.withOpacity(0.2), // synced sync_indicator + decorationColor: Colors.white.withOpacity(0.15), // not synced sync_indicator + ), + caption: TextStyle( + color: Palette.shineOrange, // not synced light + decorationColor: Colors.white, // filter icon + ), + overline: TextStyle( + color: Colors.white.withOpacity(0.2), // filter button + backgroundColor: Colors.white.withOpacity(0.5), // date section row + decorationColor: Colors.white.withOpacity(0.2) // icons (transaction and trade rows) + ), + subhead: TextStyle( + color: Colors.white.withOpacity(0.2), // address button border + decorationColor: Colors.white.withOpacity(0.4), // copy button (qr widget) + ), + headline: TextStyle( + color: Colors.white, // qr code + decorationColor: Colors.white.withOpacity(0.5), // bottom border of amount (receive page) + ), + display1: TextStyle( + color: PaletteDark.lightBlueGrey, // icons color (receive page) + decorationColor: Palette.lavender, // icons background (receive page) + ), + display2: TextStyle( + color: Palette.darkBlueCraiola, // text color of tiles (receive page) + decorationColor: Colors.white // background of tiles (receive page) + ), + display3: TextStyle( + color: Colors.white, // text color of current tile (receive page), + decorationColor: Palette.blueCraiola // background of current tile (receive page) + ), + display4: TextStyle( + color: Palette.violetBlue, // text color of tiles (account list) + decorationColor: Colors.white // background of tiles (account list) + ), + subtitle: TextStyle( + color: Colors.white, // text color of current tile (account list) + decorationColor: Palette.blueCraiola // background of current tile (account list) + ), + body1: TextStyle( + color: Palette.moderatePurpleBlue, // scrollbar thumb + decorationColor: Palette.periwinkleCraiola // scrollbar background + ), + body2: TextStyle( + color: Palette.moderateLavender, // menu header + decorationColor: Colors.white, // menu background + ) + ), + primaryTextTheme: TextTheme( + title: TextStyle( + color: Palette.darkBlueCraiola, // title color + backgroundColor: Palette.wildPeriwinkle // textfield underline + ), + caption: TextStyle( + color: PaletteDark.pigeonBlue, // secondary text + decorationColor: Palette.wildLavender // menu divider + ), + overline: TextStyle( + color: Palette.darkGray, // transaction/trade details titles + decorationColor: Colors.white.withOpacity(0.5), // placeholder + ), + + + + + subhead: TextStyle( + color: Colors.white.withOpacity(0.5) // send, exchange, buy buttons on dashboard page + ), + headline: TextStyle( + color: Palette.lightBlueGrey // historyPanelText + ), + display1: TextStyle( + color: Colors.white // menuList + ), + display2: TextStyle( + color: Palette.lavender // menuHeader + ), + display3: TextStyle( + color: Palette.lavender // historyPanelButton + ), + display4: TextStyle( + color: Palette.oceanBlue // QR code + ), + ), + + + focusColor: Colors.white, // wallet card border - hintColor: Colors.white, // menu - scaffoldBackgroundColor: Palette.blueAlice, // gradient background start - primaryColor: Palette.lightBlue, // gradient background end + cardColor: Palette.blueAlice, cardTheme: CardTheme( color: Colors.white, // synced card start ), - hoverColor: Colors.white, // synced card end - primaryTextTheme: TextTheme( - title: TextStyle( - color: Palette.oceanBlue, // primary text - backgroundColor: Colors.white // selectButton text - ), - caption: TextStyle( - color: Palette.lightBlueGrey, // secondary text - ), - overline: TextStyle( - color: Palette.lavender // address field in the wallet card - ), - subhead: TextStyle( - color: Colors.white.withOpacity(0.5) // send, exchange, buy buttons on dashboard page - ), - headline: TextStyle( - color: Palette.lightBlueGrey // historyPanelText - ), - display1: TextStyle( - color: Colors.white // menuList - ), - display2: TextStyle( - color: Palette.lavender // menuHeader - ), - display3: TextStyle( - color: Palette.lavender // historyPanelButton - ), - display4: TextStyle( - color: Palette.oceanBlue // QR code - ), -// headline1: TextStyle(color: Palette.nightBlue) - ), - dividerColor: Palette.eee, + + accentTextTheme: TextTheme( title: TextStyle( color: Palette.darkLavender, // top panel @@ -75,48 +141,113 @@ class Themes { static final ThemeData darkTheme = ThemeData( fontFamily: 'Poppins', brightness: Brightness.dark, - backgroundColor: PaletteDark.darkNightBlue, + backgroundColor: PaletteDark.backgroundColor, + accentColor: PaletteDark.backgroundColor, // first gradient color + scaffoldBackgroundColor: PaletteDark.backgroundColor, // second gradient color + primaryColor: PaletteDark.backgroundColor, // third gradient color + buttonColor: PaletteDark.nightBlue, // action buttons on dashboard page + indicatorColor: PaletteDark.cyanBlue, // page indicator + hoverColor: PaletteDark.cyanBlue, // amount hint text (receive page) + dividerColor: PaletteDark.dividerColor, + hintColor: PaletteDark.pigeonBlue, // menu + textTheme: TextTheme( + title: TextStyle( + color: PaletteDark.wildBlue, // sync_indicator text + backgroundColor: PaletteDark.lightNightBlue, // synced sync_indicator + decorationColor: PaletteDark.oceanBlue // not synced sync_indicator + ), + caption: TextStyle( + color: PaletteDark.orangeYellow, // not synced light + decorationColor: PaletteDark.wildBlue, // filter icon + ), + overline: TextStyle( + color: PaletteDark.oceanBlue, // filter button + backgroundColor: PaletteDark.darkCyanBlue, // date section row + decorationColor: PaletteDark.wildNightBlue // icons (transaction and trade rows) + ), + subhead: TextStyle( + color: PaletteDark.nightBlue, // address button border + decorationColor: PaletteDark.lightBlueGrey, // copy button (qr widget) + ), + headline: TextStyle( + color: PaletteDark.lightBlueGrey, // qr code + decorationColor: PaletteDark.darkGrey, // bottom border of amount (receive page) + ), + display1: TextStyle( + color: Colors.white, // icons color (receive page) + decorationColor: PaletteDark.distantNightBlue, // icons background (receive page) + ), + display2: TextStyle( + color: Colors.white, // text color of tiles (receive page) + decorationColor: PaletteDark.nightBlue // background of tiles (receive page) + ), + display3: TextStyle( + color: Colors.blue, // text color of current tile (receive page) + decorationColor: PaletteDark.lightOceanBlue // background of current tile (receive page) + ), + display4: TextStyle( + color: Colors.white, // text color of tiles (account list) + decorationColor: PaletteDark.darkOceanBlue // background of tiles (account list) + ), + subtitle: TextStyle( + color: Palette.blueCraiola, // text color of current tile (account list) + decorationColor: PaletteDark.darkNightBlue // background of current tile (account list) + ), + body1: TextStyle( + color: PaletteDark.wildBlueGrey, // scrollbar thumb + decorationColor: PaletteDark.violetBlue // scrollbar background + ), + body2: TextStyle( + color: PaletteDark.deepPurpleBlue, // menu header + decorationColor: PaletteDark.deepPurpleBlue, // menu background + ) + ), + primaryTextTheme: TextTheme( + title: TextStyle( + color: Colors.white, // title color + backgroundColor: PaletteDark.darkOceanBlue // textfield underline + ), + caption: TextStyle( + color: PaletteDark.darkCyanBlue, // secondary text + decorationColor: PaletteDark.darkOceanBlue // menu divider + ), + overline: TextStyle( + color: PaletteDark.lightBlueGrey, // transaction/trade details titles + decorationColor: Colors.grey, // placeholder + ), + + + + subhead: TextStyle( + color: PaletteDark.lightDistantBlue // send, exchange, buy buttons on dashboard page + ), + headline: TextStyle( + color: PaletteDark.pigeonBlue // historyPanelText + ), + display1: TextStyle( + color: PaletteDark.lightNightBlue // menuList + ), + display2: TextStyle( + color: PaletteDark.headerNightBlue // menuHeader + ), + display3: TextStyle( + color: PaletteDark.moderateNightBlue // historyPanelButton + ), + display4: TextStyle( + color: PaletteDark.gray // QR code + ), + ), + + + focusColor: PaletteDark.lightDistantBlue, // wallet card border - hintColor: PaletteDark.gray, // menu - scaffoldBackgroundColor: PaletteDark.distantBlue, // gradient background start - primaryColor: PaletteDark.distantBlue, // gradient background end cardColor: PaletteDark.darkNightBlue, cardTheme: CardTheme( color: PaletteDark.moderateBlue, // synced card start ), - hoverColor: PaletteDark.nightBlue, // synced card end - primaryTextTheme: TextTheme( - title: TextStyle( - color: Colors.white, - backgroundColor: PaletteDark.moderatePurpleBlue // selectButton text - ), - caption: TextStyle( - color: PaletteDark.gray, - ), - overline: TextStyle( - color: PaletteDark.lightDistantBlue // address field in the wallet card - ), - subhead: TextStyle( - color: PaletteDark.lightDistantBlue // send, exchange, buy buttons on dashboard page - ), - headline: TextStyle( - color: PaletteDark.pigeonBlue // historyPanelText - ), - display1: TextStyle( - color: PaletteDark.lightNightBlue // menuList - ), - display2: TextStyle( - color: PaletteDark.headerNightBlue // menuHeader - ), - display3: TextStyle( - color: PaletteDark.moderateNightBlue // historyPanelButton - ), - display4: TextStyle( - color: PaletteDark.gray // QR code - ), -// headline5: TextStyle(color: PaletteDark.gray) - ), - dividerColor: PaletteDark.distantBlue, + + + accentTextTheme: TextTheme( title: TextStyle( color: PaletteDark.moderateBlue, // top panel