CAKE-182 | changed colors on dashboard page for light theme; changed action buttons icons on dashboard page; changed buttons colors on alerts for light theme; deleted item_from_theme.dart; added getters (isLightTheme, isBrightTheme, isDarkTheme) to Themes class; applied getters to the app

This commit is contained in:
OleksandrSobol
2020-12-14 19:54:56 +02:00
parent 941e7c4dd8
commit 85497a1218
18 changed files with 88 additions and 150 deletions
+3 -2
View File
@@ -31,7 +31,7 @@ class AlertWithOneAction extends BaseAlertDialog {
width: 300,
height: 52,
padding: EdgeInsets.only(left: 12, right: 12),
color: Theme.of(context).accentTextTheme.body2.color,
color: Theme.of(context).accentTextTheme.body1.backgroundColor,
child: ButtonTheme(
minWidth: double.infinity,
child: FlatButton(
@@ -44,7 +44,8 @@ class AlertWithOneAction extends BaseAlertDialog {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
color: Colors.white,
color: Theme.of(context).primaryTextTheme.body1
.backgroundColor,
decoration: TextDecoration.none,
),
)),
+22 -3
View File
@@ -1,4 +1,7 @@
import 'dart:ui';
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart';
@@ -10,6 +13,7 @@ class BaseAlertDialog extends StatelessWidget {
VoidCallback get actionLeft => () {};
VoidCallback get actionRight => () {};
bool get barrierDismissible => true;
Themes get currentTheme => getIt.get<SettingsStore>().currentTheme;
Widget title(BuildContext context) {
return Text(
@@ -61,18 +65,26 @@ class BaseAlertDialog extends StatelessWidget {
fontSize: 15,
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: Colors.white,
color: Theme.of(context).primaryTextTheme.body2
.backgroundColor,
decoration: TextDecoration.none,
),
)),
),
)
),
currentTheme.isLightTheme
? Container(
width: 1,
height: 52,
color: Colors.grey[300],
)
: Offstage(),
Flexible(
child: Container(
height: 52,
padding: EdgeInsets.only(left: 6, right: 6),
color: Theme.of(context).accentTextTheme.body2.color,
color: Theme.of(context).accentTextTheme.body1.backgroundColor,
child: ButtonTheme(
minWidth: double.infinity,
child: FlatButton(
@@ -86,7 +98,8 @@ class BaseAlertDialog extends StatelessWidget {
fontSize: 15,
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: Colors.white,
color: Theme.of(context).primaryTextTheme.body1
.backgroundColor,
decoration: TextDecoration.none,
),
)),
@@ -133,6 +146,12 @@ class BaseAlertDialog extends StatelessWidget {
],
),
),
currentTheme.isLightTheme
? Container(
height: 1,
color: Colors.grey[300],
)
: Offstage(),
actionButtons(context)
],
),