2023-08-17 15:28:31 +00:00
|
|
|
import 'package:cake_wallet/generated/i18n.dart';
|
|
|
|
import 'package:cake_wallet/palette.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/account_list_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/address_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/indicator_dot_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
|
|
|
import 'package:cake_wallet/themes/monero_light_theme.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class HighContrastTheme extends MoneroLightTheme {
|
|
|
|
HighContrastTheme({required int raw}) : super(raw: raw) {
|
|
|
|
colorScheme = ColorScheme.fromSwatch(
|
|
|
|
primarySwatch: Colors.grey,
|
|
|
|
accentColor: primaryColor,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
cardColor: containerColor,
|
|
|
|
brightness: Brightness.light);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
String get title => S.current.high_contrast_theme;
|
|
|
|
@override
|
|
|
|
Color get primaryColor => Colors.black;
|
|
|
|
@override
|
|
|
|
Color get containerColor => Palette.highContrastGray;
|
|
|
|
@override
|
|
|
|
Color get primaryTextColor => colorScheme.onBackground;
|
|
|
|
@override
|
|
|
|
Color get dialogBackgroundColor => Colors.white;
|
|
|
|
|
|
|
|
@override
|
|
|
|
CakeTextTheme get cakeTextTheme => super.cakeTextTheme.copyWith(
|
2023-08-22 18:49:37 +00:00
|
|
|
buttonTextColor: Colors.white, buttonSecondaryTextColor: Colors.white.withOpacity(0.5));
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
2023-08-22 18:49:37 +00:00
|
|
|
SyncIndicatorTheme get syncIndicatorStyle => super
|
|
|
|
.syncIndicatorStyle
|
|
|
|
.copyWith(textColor: colorScheme.background, syncedBackgroundColor: containerColor);
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
BalancePageTheme get balancePageTheme => super.balancePageTheme.copyWith(
|
|
|
|
textColor: Colors.white,
|
|
|
|
labelTextColor: Colors.grey,
|
|
|
|
assetTitleColor: Colors.white,
|
|
|
|
balanceAmountColor: Colors.white);
|
|
|
|
|
|
|
|
@override
|
2023-08-22 18:49:37 +00:00
|
|
|
DashboardPageTheme get dashboardPageTheme => super.dashboardPageTheme.copyWith(
|
|
|
|
textColor: Colors.black,
|
|
|
|
cardTextColor: Colors.white,
|
|
|
|
mainActionsIconColor: Colors.white,
|
|
|
|
indicatorDotTheme:
|
|
|
|
IndicatorDotTheme(indicatorColor: Colors.grey, activeIndicatorColor: Colors.black));
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
2023-08-22 18:49:37 +00:00
|
|
|
ExchangePageTheme get exchangePageTheme => super.exchangePageTheme.copyWith(
|
|
|
|
firstGradientTopPanelColor: primaryColor, firstGradientBottomPanelColor: containerColor);
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
SendPageTheme get sendPageTheme => super.sendPageTheme.copyWith(
|
|
|
|
templateTitleColor: Colors.white,
|
|
|
|
templateBackgroundColor: Colors.black,
|
2023-08-22 18:49:37 +00:00
|
|
|
firstGradientColor: primaryColor);
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
2023-08-22 18:49:37 +00:00
|
|
|
AddressTheme get addressTheme => super.addressTheme.copyWith(actionButtonColor: Colors.grey);
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
2023-08-22 18:49:37 +00:00
|
|
|
FilterTheme get filterTheme => super.filterTheme.copyWith(iconColor: Colors.white);
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
CakeMenuTheme get menuTheme => super.menuTheme.copyWith(
|
|
|
|
settingTitleColor: Colors.black,
|
|
|
|
headerFirstGradientColor: containerColor,
|
|
|
|
iconColor: Colors.white);
|
|
|
|
|
|
|
|
@override
|
|
|
|
PickerTheme get pickerTheme => super.pickerTheme.copyWith(
|
2023-08-22 18:49:37 +00:00
|
|
|
searchIconColor: primaryColor,
|
|
|
|
searchHintColor: primaryColor,
|
|
|
|
searchTextColor: primaryColor,
|
|
|
|
searchBackgroundFillColor: Colors.white,
|
|
|
|
searchBorderColor: primaryColor);
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
AccountListTheme get accountListTheme => super.accountListTheme.copyWith(
|
|
|
|
tilesTextColor: Colors.black,
|
|
|
|
tilesBackgroundColor: Colors.white,
|
|
|
|
currentAccountBackgroundColor: containerColor,
|
|
|
|
currentAccountTextColor: Colors.white,
|
|
|
|
currentAccountAmountColor: Colors.white);
|
|
|
|
|
|
|
|
@override
|
|
|
|
ReceivePageTheme get receivePageTheme => super.receivePageTheme.copyWith(
|
2023-08-22 18:49:37 +00:00
|
|
|
tilesTextColor: Colors.white, iconsBackgroundColor: Colors.grey, iconsColor: Colors.black);
|
2023-08-17 15:28:31 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
ThemeData get themeData => super.themeData.copyWith(
|
|
|
|
disabledColor: Colors.grey,
|
2023-08-22 18:49:37 +00:00
|
|
|
dialogTheme: super.themeData.dialogTheme.copyWith(backgroundColor: Colors.white));
|
2023-08-17 15:28:31 +00:00
|
|
|
}
|