diff --git a/lib/src/screens/contact/contact_page.dart b/lib/src/screens/contact/contact_page.dart index ebe2db4d9..9ec2a0372 100644 --- a/lib/src/screens/contact/contact_page.dart +++ b/lib/src/screens/contact/contact_page.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/core/address_validator.dart'; import 'package:cake_wallet/palette.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cw_core/currency.dart'; import 'package:flutter/material.dart'; @@ -48,7 +49,7 @@ class ContactPage extends BasePage { @override Widget body(BuildContext context) { final downArrow = Image.asset('assets/images/arrow_bottom_purple_icon.png', - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor, height: 8); reaction((_) => contactViewModel.state, (ExecutionState state) { diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index b9ffa8a00..da408fe72 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/src/widgets/picker_wrapper_widget.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; //import 'package:date_range_picker/date_range_picker.dart' as date_rage_picker; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class FilterWidget extends StatelessWidget { FilterWidget({required this.dashboardViewModel}); @@ -33,10 +34,7 @@ class FilterWidget extends StatelessWidget { child: Text( S.of(context).filter_by, style: TextStyle( - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!, + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor, fontSize: 16, fontFamily: 'Lato', decoration: TextDecoration.none, diff --git a/lib/src/screens/dashboard/widgets/transaction_raw.dart b/lib/src/screens/dashboard/widgets/transaction_raw.dart index cfc6001b9..2ad0e4bd3 100644 --- a/lib/src/screens/dashboard/widgets/transaction_raw.dart +++ b/lib/src/screens/dashboard/widgets/transaction_raw.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class TransactionRow extends StatelessWidget { TransactionRow( @@ -36,7 +37,7 @@ class TransactionRow extends StatelessWidget { width: 36, decoration: BoxDecoration( shape: BoxShape.circle, - color: Theme.of(context).textTheme!.labelSmall!.decorationColor! + color: Theme.of(context).extension<TransactionTradeTheme>()!.rowsColor ), child: Image.asset( direction == TransactionDirection.incoming diff --git a/lib/src/screens/exchange_trade/exchange_confirm_page.dart b/lib/src/screens/exchange_trade/exchange_confirm_page.dart index 96e23e25e..dfe65b621 100644 --- a/lib/src/screens/exchange_trade/exchange_confirm_page.dart +++ b/lib/src/screens/exchange_trade/exchange_confirm_page.dart @@ -10,6 +10,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/exchange/trade.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class ExchangeConfirmPage extends BasePage { ExchangeConfirmPage({required this.tradesStore}) : trade = tradesStore.trade!; @@ -65,10 +66,7 @@ class ExchangeConfirmPage extends BasePage { style: TextStyle( fontSize: 12.0, fontWeight: FontWeight.w500, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), ), Text( trade.id, diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart index a7eae3cd6..96ad3d97a 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart @@ -21,6 +21,7 @@ import 'package:cake_wallet/src/screens/exchange_trade/widgets/timer_widget.dart import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; void showInformation( ExchangeTradeViewModel exchangeTradeViewModel, BuildContext context) { @@ -112,7 +113,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> { final copyImage = Image.asset('assets/images/copy_content.png', height: 16, width: 16, - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!); + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor); _setEffects(); @@ -134,10 +135,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> { style: TextStyle( fontSize: 14.0, fontWeight: FontWeight.w500, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), ), if (trade.expiredAt != null) TimerWidget(trade.expiredAt!, diff --git a/lib/src/screens/ionia/cards/ionia_account_cards_page.dart b/lib/src/screens/ionia/cards/ionia_account_cards_page.dart index 86bbfa4d5..c24f83f8a 100644 --- a/lib/src/screens/ionia/cards/ionia_account_cards_page.dart +++ b/lib/src/screens/ionia/cards/ionia_account_cards_page.dart @@ -12,6 +12,7 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class IoniaAccountCardsPage extends BasePage { IoniaAccountCardsPage(this.ioniaAccountViewModel); @@ -172,7 +173,7 @@ class _IoniaCardListView extends StatelessWidget { emptyText, textAlign: TextAlign.center, style: textSmall( - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor, ), ), ) diff --git a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart index 8d4f97adf..7ac64400d 100644 --- a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart @@ -20,6 +20,7 @@ import 'package:mobx/mobx.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/send/widgets/confirm_sending_alert.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class IoniaBuyGiftCardDetailPage extends BasePage { IoniaBuyGiftCardDetailPage(this.ioniaPurchaseViewModel); @@ -416,7 +417,7 @@ class TipButton extends StatelessWidget { return isSelected ? Theme.of(context).dialogTheme.backgroundColor! - : Theme.of(context).primaryTextTheme!.labelSmall!.color!; + : Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor; } Color? backgroundColor(BuildContext context) { diff --git a/lib/src/screens/ionia/cards/ionia_payment_status_page.dart b/lib/src/screens/ionia/cards/ionia_payment_status_page.dart index a99520334..0d1f44161 100644 --- a/lib/src/screens/ionia/cards/ionia_payment_status_page.dart +++ b/lib/src/screens/ionia/cards/ionia_payment_status_page.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:mobx/mobx.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class IoniaPaymentStatusPage extends BasePage { IoniaPaymentStatusPage(this.viewModel); @@ -196,7 +197,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage Text( title, style: textXSmall( - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor, ), ), SizedBox(height: 8), diff --git a/lib/src/screens/ionia/widgets/ionia_tile.dart b/lib/src/screens/ionia/widgets/ionia_tile.dart index b7a672b35..a74102899 100644 --- a/lib/src/screens/ionia/widgets/ionia_tile.dart +++ b/lib/src/screens/ionia/widgets/ionia_tile.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/typography.dart'; import 'package:flutter/material.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class IoniaTile extends StatelessWidget { const IoniaTile({ @@ -26,7 +27,7 @@ class IoniaTile extends StatelessWidget { Text( title, style: textXSmall( - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor, ), ), SizedBox(height: 8), diff --git a/lib/src/screens/restore/widgets/restore_button.dart b/lib/src/screens/restore/widgets/restore_button.dart index 2b2936799..44439cd31 100644 --- a/lib/src/screens/restore/widgets/restore_button.dart +++ b/lib/src/screens/restore/widgets/restore_button.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class RestoreButton extends StatelessWidget { const RestoreButton({ @@ -57,10 +58,7 @@ class RestoreButton extends StatelessWidget { style: TextStyle( fontSize: 14, fontWeight: FontWeight.normal, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), ), ) ], diff --git a/lib/src/screens/seed/wallet_seed_page.dart b/lib/src/screens/seed/wallet_seed_page.dart index 3ae31ff09..284357428 100644 --- a/lib/src/screens/seed/wallet_seed_page.dart +++ b/lib/src/screens/seed/wallet_seed_page.dart @@ -13,6 +13,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/view_model/wallet_seed_view_model.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class WalletSeedPage extends BasePage { WalletSeedPage(this.walletSeedViewModel, {required this.isNewWalletCreated}); @@ -150,10 +151,7 @@ class WalletSeedPage extends BasePage { style: TextStyle( fontSize: 12, fontWeight: FontWeight.normal, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), ), ) : Offstage(), diff --git a/lib/src/screens/settings/widgets/settings_cell_with_arrow.dart b/lib/src/screens/settings/widgets/settings_cell_with_arrow.dart index 1d97db08c..3d8610a24 100644 --- a/lib/src/screens/settings/widgets/settings_cell_with_arrow.dart +++ b/lib/src/screens/settings/widgets/settings_cell_with_arrow.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/standard_list.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class SettingsCellWithArrow extends StandardListRow { SettingsCellWithArrow({required String title, required Function(BuildContext context)? handler}) @@ -8,5 +9,5 @@ class SettingsCellWithArrow extends StandardListRow { @override Widget buildTrailing(BuildContext context) => Image.asset('assets/images/select_arrow.png', - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!); + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor); } \ No newline at end of file diff --git a/lib/src/screens/settings/widgets/settings_version_cell.dart b/lib/src/screens/settings/widgets/settings_version_cell.dart index e314d549d..8ab1a1672 100644 --- a/lib/src/screens/settings/widgets/settings_version_cell.dart +++ b/lib/src/screens/settings/widgets/settings_version_cell.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class SettingsVersionCell extends StatelessWidget { SettingsVersionCell({required this.title}); @@ -18,7 +19,7 @@ class SettingsVersionCell extends StatelessWidget { style: TextStyle( fontSize: 12, fontWeight: FontWeight.normal, - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), ) ], ), diff --git a/lib/src/screens/transaction_details/widgets/textfield_list_row.dart b/lib/src/screens/transaction_details/widgets/textfield_list_row.dart index 18e5368a6..3cd49e79b 100644 --- a/lib/src/screens/transaction_details/widgets/textfield_list_row.dart +++ b/lib/src/screens/transaction_details/widgets/textfield_list_row.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class TextFieldListRow extends StatelessWidget { TextFieldListRow( @@ -34,10 +35,7 @@ class TextFieldListRow extends StatelessWidget { style: TextStyle( fontSize: titleFontSize, fontWeight: FontWeight.w500, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), textAlign: TextAlign.left), TextField( controller: _textController, @@ -57,10 +55,7 @@ class TextFieldListRow extends StatelessWidget { hintStyle: TextStyle( fontSize: valueFontSize, fontWeight: FontWeight.w500, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), border: InputBorder.none), onSubmitted: (value) => onSubmitted?.call(value), ) diff --git a/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart b/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart index 43550a9c5..f62582460 100644 --- a/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart +++ b/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/src/widgets/standard_switch.dart'; import 'package:flutter/material.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class UnspentCoinsSwitchRow extends StatelessWidget { UnspentCoinsSwitchRow( @@ -28,10 +29,7 @@ class UnspentCoinsSwitchRow extends StatelessWidget { style: TextStyle( fontSize: titleFontSize, fontWeight: FontWeight.w500, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), textAlign: TextAlign.left), Padding( padding: EdgeInsets.only(top: 12), diff --git a/lib/src/widgets/list_row.dart b/lib/src/widgets/list_row.dart index d9d9e2f8d..610b75358 100644 --- a/lib/src/widgets/list_row.dart +++ b/lib/src/widgets/list_row.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class ListRow extends StatelessWidget { ListRow( @@ -30,10 +31,7 @@ class ListRow extends StatelessWidget { style: TextStyle( fontSize: titleFontSize, fontWeight: FontWeight.w500, - color: Theme.of(context) - .primaryTextTheme! - .labelSmall! - .color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), textAlign: TextAlign.left), Padding( padding: const EdgeInsets.only(top: 12), diff --git a/lib/src/widgets/standard_list_status_row.dart b/lib/src/widgets/standard_list_status_row.dart index ed8bbd827..602ae0792 100644 --- a/lib/src/widgets/standard_list_status_row.dart +++ b/lib/src/widgets/standard_list_status_row.dart @@ -3,6 +3,7 @@ import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.da import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/themes/extensions/address_theme.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; class StandardListStatusRow extends StatelessWidget { StandardListStatusRow({required this.title, required this.value}); @@ -25,7 +26,7 @@ class StandardListStatusRow extends StatelessWidget { style: TextStyle( fontSize: 14, fontWeight: FontWeight.w500, - color: Theme.of(context).primaryTextTheme!.labelSmall!.color!), + color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor), textAlign: TextAlign.left), Padding( padding: const EdgeInsets.only(top: 12), diff --git a/lib/themes/bright_theme.dart b/lib/themes/bright_theme.dart index 0d653a587..2ab96fbde 100644 --- a/lib/themes/bright_theme.dart +++ b/lib/themes/bright_theme.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/themes/extensions/order_theme.dart'; import 'package:cake_wallet/themes/extensions/placeholder_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/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart'; import 'package:cake_wallet/themes/light_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; @@ -90,6 +91,11 @@ class BrightTheme extends LightTheme { PlaceholderTheme get placeholderTheme => PlaceholderTheme(color: Colors.white.withOpacity(0.5)); + @override + TransactionTradeTheme get transactionTradeTheme => super + .transactionTradeTheme + .copyWith(rowsColor: Colors.white.withOpacity(0.2)); + @override ThemeData get themeData => super.themeData.copyWith( indicatorColor: Colors.white.withOpacity(0.5), // page indicator @@ -100,8 +106,6 @@ class BrightTheme extends LightTheme { labelSmall: TextStyle( backgroundColor: Colors.white.withOpacity(0.5), // date section row - decorationColor: Colors.white - .withOpacity(0.2) // icons (transaction and trade rows) ), // subhead -> titleMedium titleMedium: TextStyle( @@ -150,9 +154,6 @@ class BrightTheme extends LightTheme { bodySmall: TextStyle( color: PaletteDark.pigeonBlue, // secondary text ), - labelSmall: TextStyle( - color: Palette.darkGray, // transaction/trade details titles - ), ), ); } diff --git a/lib/themes/dark_theme.dart b/lib/themes/dark_theme.dart index 3d78d23f7..66872425d 100644 --- a/lib/themes/dark_theme.dart +++ b/lib/themes/dark_theme.dart @@ -18,6 +18,7 @@ import 'package:cake_wallet/themes/extensions/seed_widget_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/themes/extensions/support_page_theme.dart'; import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -160,6 +161,11 @@ class DarkTheme extends ThemeBase { @override PlaceholderTheme get placeholderTheme => PlaceholderTheme(color: Colors.grey); + @override + TransactionTradeTheme get transactionTradeTheme => TransactionTradeTheme( + detailsTitlesColor: PaletteDark.lightBlueGrey, + rowsColor: PaletteDark.wildNightBlue); + @override ThemeData get themeData => super.themeData.copyWith( indicatorColor: PaletteDark.cyanBlue, // page indicator @@ -174,8 +180,6 @@ class DarkTheme extends ThemeBase { textTheme: TextTheme( labelSmall: TextStyle( backgroundColor: PaletteDark.darkCyanBlue, // date section row - decorationColor: PaletteDark - .wildNightBlue // icons (transaction and trade rows) ), // subhead -> titleMedium titleMedium: TextStyle( @@ -221,10 +225,6 @@ class DarkTheme extends ThemeBase { bodySmall: TextStyle( color: PaletteDark.darkCyanBlue, // secondary text ), - labelSmall: TextStyle( - color: - PaletteDark.lightBlueGrey, // transaction/trade details titles - ), ), ); } diff --git a/lib/themes/extensions/transaction_trade_theme.dart b/lib/themes/extensions/transaction_trade_theme.dart new file mode 100644 index 000000000..d912a8850 --- /dev/null +++ b/lib/themes/extensions/transaction_trade_theme.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; + +class TransactionTradeTheme extends ThemeExtension<TransactionTradeTheme> { + final Color detailsTitlesColor; + final Color rowsColor; + + TransactionTradeTheme( + {required this.detailsTitlesColor, required this.rowsColor}); + + @override + TransactionTradeTheme copyWith( + {Color? detailsTitlesColor, Color? rowsColor}) => + TransactionTradeTheme( + detailsTitlesColor: detailsTitlesColor ?? this.detailsTitlesColor, + rowsColor: rowsColor ?? this.rowsColor); + + @override + TransactionTradeTheme lerp( + ThemeExtension<TransactionTradeTheme>? other, double t) { + if (other is! TransactionTradeTheme) { + return this; + } + + return TransactionTradeTheme( + detailsTitlesColor: + Color.lerp(detailsTitlesColor, other.detailsTitlesColor, t)!, + rowsColor: Color.lerp(rowsColor, other.rowsColor, t)!); + } +} diff --git a/lib/themes/light_theme.dart b/lib/themes/light_theme.dart index bde5a97ea..3deb47ec1 100644 --- a/lib/themes/light_theme.dart +++ b/lib/themes/light_theme.dart @@ -18,6 +18,7 @@ import 'package:cake_wallet/themes/extensions/seed_widget_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/themes/extensions/support_page_theme.dart'; import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -162,6 +163,11 @@ class LightTheme extends ThemeBase { PlaceholderTheme get placeholderTheme => PlaceholderTheme(color: PaletteDark.darkCyanBlue); + @override + TransactionTradeTheme get transactionTradeTheme => TransactionTradeTheme( + detailsTitlesColor: Palette.darkGray, + rowsColor: Palette.blueAlice); + @override ThemeData get themeData => super.themeData.copyWith( indicatorColor: @@ -177,8 +183,6 @@ class LightTheme extends ThemeBase { textTheme: TextTheme( labelSmall: TextStyle( backgroundColor: PaletteDark.darkCyanBlue, // date section row - decorationColor: - Palette.blueAlice // icons (transaction and trade rows) ), // subhead -> titleMedium titleMedium: TextStyle( @@ -225,9 +229,6 @@ class LightTheme extends ThemeBase { bodySmall: TextStyle( color: PaletteDark.pigeonBlue, // secondary text ), - labelSmall: TextStyle( - color: Palette.darkGray, // transaction/trade details titles - ), ), ); } diff --git a/lib/themes/theme_base.dart b/lib/themes/theme_base.dart index df18e7cde..a9d21fb0d 100644 --- a/lib/themes/theme_base.dart +++ b/lib/themes/theme_base.dart @@ -17,6 +17,7 @@ import 'package:cake_wallet/themes/extensions/seed_widget_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/themes/extensions/support_page_theme.dart'; import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; +import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart'; import 'package:flutter/material.dart'; @@ -94,6 +95,8 @@ abstract class ThemeBase { PlaceholderTheme get placeholderTheme; + TransactionTradeTheme get transactionTradeTheme; + ThemeData get themeData => generatedThemeData.copyWith( primaryColor: primaryColor, cardColor: containerColor, @@ -119,6 +122,7 @@ abstract class ThemeBase { sendPageTheme, seedWidgetTheme, placeholderTheme, + transactionTradeTheme, ], scrollbarTheme: ScrollbarThemeData( thumbColor: MaterialStateProperty.all(scrollbarTheme.thumbColor),