From cedc54c11cd7222e4435feb57e0b337e93f04747 Mon Sep 17 00:00:00 2001 From: Rafael Saes Date: Wed, 12 Jul 2023 10:00:51 -0300 Subject: [PATCH] fix: unspent coins page --- .../widgets/unspent_coins_list_item.dart | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart b/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart index b1916d06c..195101cc2 100644 --- a/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart +++ b/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart @@ -1,8 +1,7 @@ import 'package:auto_size_text/auto_size_text.dart'; -import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/widgets/standard_checkbox.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; import 'package:cake_wallet/generated/i18n.dart'; class UnspentCoinsListItem extends StatelessWidget { @@ -15,11 +14,6 @@ class UnspentCoinsListItem extends StatelessWidget { this.onCheckBoxTap, }); - static const amountColor = Palette.darkBlueCraiola; - static const addressColor = Palette.darkGray; - static const selectedItemColor = Palette.paleCornflowerBlue; - static const unselectedItemColor = Palette.moderateLavender; - final String note; final String amount; final String address; @@ -29,7 +23,17 @@ class UnspentCoinsListItem extends StatelessWidget { @override Widget build(BuildContext context) { + final unselectedItemColor = Theme.of(context).cardColor; + final selectedItemColor = Theme.of(context).primaryColor; final itemColor = isSending ? selectedItemColor : unselectedItemColor; + + final amountColor = isSending + ? Colors.white + : Theme.of(context).extension()!.titleColor; + final addressColor = isSending + ? Colors.white.withOpacity(0.5) + : Theme.of(context).extension()!.secondaryTextColor; + return Container( height: 70, padding: EdgeInsets.symmetric(vertical: 6, horizontal: 12), @@ -41,6 +45,8 @@ class UnspentCoinsListItem extends StatelessWidget { Padding( padding: EdgeInsets.only(right: 12), child: StandardCheckbox( + iconColor: amountColor, + borderColor: addressColor, value: isSending, onChanged: (value) => onCheckBoxTap?.call())), Expanded( child: Column(