added proper colors to light_colors.dart and a couple other fixes

This commit is contained in:
julian 2022-09-21 18:34:53 -06:00
parent f5a3fddfe9
commit 559da849ce
3 changed files with 59 additions and 59 deletions

View file

@ -142,8 +142,8 @@ void main() async {
monero.onStartup(); monero.onStartup();
await Hive.openBox<dynamic>(DB.boxNameTheme); await Hive.openBox<dynamic>(DB.boxNameTheme);
final colorScheme = final colorScheme = DB.instance
DB.instance.get<dynamic>(boxName: DB.boxNameTheme, key: "colorScheme") as String?; .get<dynamic>(boxName: DB.boxNameTheme, key: "colorScheme") as String?;
switch (colorScheme) { switch (colorScheme) {
case "dark": case "dark":

View file

@ -4,6 +4,7 @@ import 'package:stackwallet/hive/db.dart';
import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/stack_theme.dart'; import 'package:stackwallet/utilities/theme/stack_theme.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/custom_buttons/draggable_switch_button.dart'; import 'package:stackwallet/widgets/custom_buttons/draggable_switch_button.dart';
@ -139,14 +140,13 @@ class AppearanceSettingsView extends ConsumerWidget {
as String?) == as String?) ==
"dark", "dark",
onValueChanged: (newValue) { onValueChanged: (newValue) {
// StackTheme.instance.setTheme(newValue
// ? ThemeType.dark
// : ThemeType.light);
DB.instance.put<dynamic>( DB.instance.put<dynamic>(
boxName: DB.boxNameTheme, boxName: DB.boxNameTheme,
key: "colorScheme", key: "colorScheme",
value: value: (newValue
StackTheme.instance.theme.name, ? ThemeType.dark
: ThemeType.light)
.name,
); );
}, },
), ),

View file

@ -58,18 +58,18 @@ class LightColors extends StackColorTheme {
@override @override
Color get buttonBackPrimary => const Color(0xFF232323); Color get buttonBackPrimary => const Color(0xFF232323);
@override @override
Color get buttonBackSecondary => const Color(0xFF444E5C); Color get buttonBackSecondary => const Color(0xFFE0E3E3);
@override @override
Color get buttonBackPrimaryDisabled => const Color(0xFF38517C); Color get buttonBackPrimaryDisabled => const Color(0xFFD7D7D7);
@override @override
Color get buttonBackSecondaryDisabled => const Color(0xFF3B3F46); Color get buttonBackSecondaryDisabled => const Color(0xFFF0F1F1);
@override @override
Color get buttonBackBorder => const Color(0xFF232323); Color get buttonBackBorder => const Color(0xFF232323);
@override @override
Color get buttonBackBorderDisabled => const Color(0xFF314265); Color get buttonBackBorderDisabled => const Color(0xFFB6B6B6);
@override @override
Color get numberBackDefault => const Color(0xFF484B51); Color get numberBackDefault => const Color(0xFFFFFFFF);
@override @override
Color get numpadBackDefault => const Color(0xFF232323); Color get numpadBackDefault => const Color(0xFF232323);
@override @override
@ -79,25 +79,25 @@ class LightColors extends StackColorTheme {
@override @override
Color get buttonTextPrimary => const Color(0xFFFFFFFF); Color get buttonTextPrimary => const Color(0xFFFFFFFF);
@override @override
Color get buttonTextSecondary => const Color(0xFFFFFFFF); Color get buttonTextSecondary => const Color(0xFF232323);
@override @override
Color get buttonTextPrimaryDisabled => const Color(0xFFFFFFFF); Color get buttonTextPrimaryDisabled => const Color(0xFFF8F8F8);
@override @override
Color get buttonTextSecondaryDisabled => const Color(0xFF6A6C71); Color get buttonTextSecondaryDisabled => const Color(0xFFB7B7B7);
@override @override
Color get buttonTextBorder => const Color(0xFF4C86E9); Color get buttonTextBorder => const Color(0xFF232323);
@override @override
Color get buttonTextDisabled => const Color(0xFF314265); Color get buttonTextDisabled => const Color(0xFFB6B6B6);
@override @override
Color get buttonTextBorderless => const Color(0xFF4C86E9); Color get buttonTextBorderless => const Color(0xFF232323);
@override @override
Color get buttonTextBorderlessDisabled => const Color(0xFFB6B6B6); Color get buttonTextBorderlessDisabled => const Color(0xFFB6B6B6);
@override @override
Color get numberTextDefault => const Color(0xFFFFFFFF); Color get numberTextDefault => const Color(0xFF232323);
@override @override
Color get numpadTextDefault => const Color(0xFFFFFFFF); Color get numpadTextDefault => const Color(0xFFFFFFFF);
@override @override
Color get bottomNavText => const Color(0xFFFFFFFF); Color get bottomNavText => const Color(0xFF232323);
// switch // switch
@override @override
@ -147,32 +147,32 @@ class LightColors extends StackColorTheme {
// snack bar // snack bar
@override @override
Color get snackBarBackSuccess => const Color(0xFF8EF5C3); Color get snackBarBackSuccess => const Color(0xFFB9E9D4);
@override @override
Color get snackBarBackError => const Color(0xFFFFB4A9); Color get snackBarBackError => const Color(0xFFFFDAD4);
@override @override
Color get snackBarBackInfo => const Color(0xFFB4C4FF); Color get snackBarBackInfo => const Color(0xFFDAE2FF);
@override @override
Color get snackBarTextSuccess => const Color(0xFF003921); Color get snackBarTextSuccess => const Color(0xFF006C4D);
@override @override
Color get snackBarTextError => const Color(0xFF690001); Color get snackBarTextError => const Color(0xFF930006);
@override @override
Color get snackBarTextInfo => const Color(0xFF00297A); Color get snackBarTextInfo => const Color(0xFF002A78);
// icons // icons
@override @override
Color get bottomNavIconBack => const Color(0xFF7F8185); Color get bottomNavIconBack => const Color(0xFFA2A2A2);
@override @override
Color get bottomNavIconIcon => const Color(0xFFFFFFFF); Color get bottomNavIconIcon => const Color(0xFF232323);
@override @override
Color get topNavIconPrimary => const Color(0xFFFFFFFF); Color get topNavIconPrimary => const Color(0xFF232323);
@override @override
Color get topNavIconGreen => const Color(0xFF4CC0A0); Color get topNavIconGreen => const Color(0xFF00A578);
@override @override
Color get topNavIconYellow => const Color(0xFFF7D65D); Color get topNavIconYellow => const Color(0xFFF4C517);
@override @override
Color get topNavIconRed => const Color(0xFFD34E50); Color get topNavIconRed => const Color(0xFFC00205);
@override @override
Color get settingsIconBack => const Color(0xFFE0E3E3); Color get settingsIconBack => const Color(0xFFE0E3E3);
@ -185,11 +185,11 @@ class LightColors extends StackColorTheme {
// text field // text field
@override @override
Color get textFieldActiveBG => const Color(0xFFE9EAEC); Color get textFieldActiveBG => const Color(0xFFEEEFF1);
@override @override
Color get textFieldDefaultBG => const Color(0xFFEEEFF1); Color get textFieldDefaultBG => const Color(0xFFEEEFF1);
@override @override
Color get textFieldErrorBG => const Color(0xFFFFB4A9); Color get textFieldErrorBG => const Color(0xFFFFDAD4);
@override @override
Color get textFieldSuccessBG => const Color(0xFFB9E9D4); Color get textFieldSuccessBG => const Color(0xFFB9E9D4);
@ -198,12 +198,12 @@ class LightColors extends StackColorTheme {
@override @override
Color get textFieldDefaultSearchIconLeft => const Color(0xFFA9ACAC); Color get textFieldDefaultSearchIconLeft => const Color(0xFFA9ACAC);
@override @override
Color get textFieldErrorSearchIconLeft => const Color(0xFF690001); Color get textFieldErrorSearchIconLeft => const Color(0xFF930006);
@override @override
Color get textFieldSuccessSearchIconLeft => const Color(0xFF003921); Color get textFieldSuccessSearchIconLeft => const Color(0xFF006C4D);
@override @override
Color get textFieldActiveText => const Color(0xFFFFFFFF); Color get textFieldActiveText => const Color(0xFF232323);
@override @override
Color get textFieldDefaultText => const Color(0xFFA9ACAC); Color get textFieldDefaultText => const Color(0xFFA9ACAC);
@override @override
@ -214,40 +214,40 @@ class LightColors extends StackColorTheme {
@override @override
Color get textFieldActiveLabel => const Color(0xFFA9ACAC); Color get textFieldActiveLabel => const Color(0xFFA9ACAC);
@override @override
Color get textFieldErrorLabel => const Color(0xFF690001); Color get textFieldErrorLabel => const Color(0xFF930006);
@override @override
Color get textFieldSuccessLabel => const Color(0xFF003921); Color get textFieldSuccessLabel => const Color(0xFF006C4D);
@override @override
Color get textFieldActiveSearchIconRight => const Color(0xFFC4C7C7); Color get textFieldActiveSearchIconRight => const Color(0xFF747778);
@override @override
Color get textFieldDefaultSearchIconRight => const Color(0xFF747778); Color get textFieldDefaultSearchIconRight => const Color(0xFF747778);
@override @override
Color get textFieldErrorSearchIconRight => const Color(0xFF690001); Color get textFieldErrorSearchIconRight => const Color(0xFF930006);
@override @override
Color get textFieldSuccessSearchIconRight => const Color(0xFF003921); Color get textFieldSuccessSearchIconRight => const Color(0xFF006C4D);
// settings item level2 // settings item level2
@override @override
Color get settingsItem2ActiveBG => const Color(0xFF484B51); Color get settingsItem2ActiveBG => const Color(0xFFFFFFFF);
@override @override
Color get settingsItem2ActiveText => const Color(0xFFFFFFFF); Color get settingsItem2ActiveText => const Color(0xFF232323);
@override @override
Color get settingsItem2ActiveSub => const Color(0xFF9E9E9E); Color get settingsItem2ActiveSub => const Color(0xFF8E9192);
// radio buttons // radio buttons
@override @override
Color get radioButtonIconBorder => const Color(0xFF4C86E9); Color get radioButtonIconBorder => const Color(0xFF0056D2);
@override @override
Color get radioButtonIconBorderDisabled => const Color(0xFF9E9E9E); Color get radioButtonIconBorderDisabled => const Color(0xFF8F909A);
@override @override
Color get radioButtonBorderEnabled => const Color(0xFF4C86E9); Color get radioButtonBorderEnabled => const Color(0xFF0056D2);
@override @override
Color get radioButtonBorderDisabled => const Color(0xFFCDCDCD); Color get radioButtonBorderDisabled => const Color(0xFFCDCDCD);
@override @override
Color get radioButtonIconCircle => const Color(0xFF9E9E9E); Color get radioButtonIconCircle => const Color(0xFF0056D2);
@override @override
Color get radioButtonIconEnabled => const Color(0xFF4C86E9); Color get radioButtonIconEnabled => const Color(0xFF0056D2);
@override @override
Color get radioButtonTextEnabled => const Color(0xFF44464E); Color get radioButtonTextEnabled => const Color(0xFF44464E);
@override @override
@ -259,29 +259,29 @@ class LightColors extends StackColorTheme {
// info text // info text
@override @override
Color get infoItemBG => const Color(0xFF333942); Color get infoItemBG => const Color(0xFFFFFFFF);
@override @override
Color get infoItemLabel => const Color(0xFF9E9E9E); Color get infoItemLabel => const Color(0xFF8E9192);
@override @override
Color get infoItemText => const Color(0xFFFFFFFF); Color get infoItemText => const Color(0xFF232323);
@override @override
Color get infoItemIcons => const Color(0xFF4C86E9); Color get infoItemIcons => const Color(0xFF0056D2);
// popup // popup
@override @override
Color get popupBG => const Color(0xFF333942); Color get popupBG => const Color(0xFFFFFFFF);
// currency list // currency list
@override @override
Color get currencyListItemBG => const Color(0xFF35383D); Color get currencyListItemBG => const Color(0xFFD9E2FF);
// bottom nav // bottom nav
@override @override
Color get stackWalletBG => const Color(0xFF35383D); Color get stackWalletBG => const Color(0xFFFFFFFF);
@override @override
Color get stackWalletMid => const Color(0xFF292D34); Color get stackWalletMid => const Color(0xFFFFFFFF);
@override @override
Color get stackWalletBottom => const Color(0xFFFFFFFF); Color get stackWalletBottom => const Color(0xFF232323);
@override @override
Color get bottomNavShadow => const Color(0xFF282E33); Color get bottomNavShadow => const Color(0xFF282E33);
} }