mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
fix-colors-for-address-tile-send-UI (#2113)
* Update confirm_sending_bottom_sheet_widget.dart * Update standard_slide_button_widget.dart
This commit is contained in:
parent
102ab8dbe6
commit
13dc6de8dd
2 changed files with 36 additions and 11 deletions
|
@ -3,6 +3,7 @@ import 'package:cake_wallet/src/widgets/standard_slide_button_widget.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/balance_page_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/cake_text_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
|
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
import 'package:cake_wallet/themes/theme_base.dart';
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
import 'package:cake_wallet/view_model/send/output.dart';
|
import 'package:cake_wallet/view_model/send/output.dart';
|
||||||
import 'package:cw_core/crypto_currency.dart';
|
import 'package:cw_core/crypto_currency.dart';
|
||||||
|
@ -71,6 +72,12 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||||
decoration: TextDecoration.none,
|
decoration: TextDecoration.none,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final tileBackgroundColor = currentTheme.type == ThemeType.light
|
||||||
|
? Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor
|
||||||
|
: currentTheme.type == ThemeType.oled
|
||||||
|
? Colors.black.withOpacity(0.5)
|
||||||
|
: Theme.of(context).extension<FilterTheme>()!.buttonColor;
|
||||||
|
|
||||||
Widget content = Padding(
|
Widget content = Padding(
|
||||||
padding: EdgeInsets.fromLTRB(8, 0, showScrollbar ? 16 : 8, 8),
|
padding: EdgeInsets.fromLTRB(8, 0, showScrollbar ? 16 : 8, 8),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -86,6 +93,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||||
amount: '',
|
amount: '',
|
||||||
address: paymentIdValue!,
|
address: paymentIdValue!,
|
||||||
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
||||||
|
tileBackgroundColor: tileBackgroundColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
StandardTile(
|
StandardTile(
|
||||||
|
@ -94,6 +102,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||||
itemTitleTextStyle: itemTitleTextStyle,
|
itemTitleTextStyle: itemTitleTextStyle,
|
||||||
itemSubTitle: fiatAmountValue,
|
itemSubTitle: fiatAmountValue,
|
||||||
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
||||||
|
tileBackgroundColor: tileBackgroundColor,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
StandardTile(
|
StandardTile(
|
||||||
|
@ -102,6 +111,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||||
itemTitleTextStyle: itemTitleTextStyle,
|
itemTitleTextStyle: itemTitleTextStyle,
|
||||||
itemSubTitle: feeFiatAmount,
|
itemSubTitle: feeFiatAmount,
|
||||||
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
||||||
|
tileBackgroundColor: tileBackgroundColor,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Column(
|
Column(
|
||||||
|
@ -130,6 +140,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||||
isBatchSending: isBatchSending,
|
isBatchSending: isBatchSending,
|
||||||
itemTitleTextStyle: itemTitleTextStyle,
|
itemTitleTextStyle: itemTitleTextStyle,
|
||||||
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
||||||
|
tileBackgroundColor: tileBackgroundColor,
|
||||||
)
|
)
|
||||||
: AddressTile(
|
: AddressTile(
|
||||||
itemTitle: 'Address',
|
itemTitle: 'Address',
|
||||||
|
@ -139,6 +150,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||||
amount: _amount,
|
amount: _amount,
|
||||||
address: _address,
|
address: _address,
|
||||||
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
||||||
|
tileBackgroundColor: tileBackgroundColor,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -154,6 +166,7 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||||
isBatchSending: true,
|
isBatchSending: true,
|
||||||
itemTitleTextStyle: itemTitleTextStyle,
|
itemTitleTextStyle: itemTitleTextStyle,
|
||||||
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
itemSubTitleTextStyle: itemSubTitleTextStyle,
|
||||||
|
tileBackgroundColor: tileBackgroundColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -214,6 +227,7 @@ class StandardTile extends StatelessWidget {
|
||||||
required this.itemTitleTextStyle,
|
required this.itemTitleTextStyle,
|
||||||
this.itemSubTitle,
|
this.itemSubTitle,
|
||||||
required this.itemSubTitleTextStyle,
|
required this.itemSubTitleTextStyle,
|
||||||
|
required this.tileBackgroundColor,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String itemTitle;
|
final String itemTitle;
|
||||||
|
@ -221,14 +235,14 @@ class StandardTile extends StatelessWidget {
|
||||||
final TextStyle itemTitleTextStyle;
|
final TextStyle itemTitleTextStyle;
|
||||||
final String? itemSubTitle;
|
final String? itemSubTitle;
|
||||||
final TextStyle itemSubTitleTextStyle;
|
final TextStyle itemSubTitleTextStyle;
|
||||||
|
final Color tileBackgroundColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration:
|
||||||
borderRadius: BorderRadius.circular(10),
|
BoxDecoration(borderRadius: BorderRadius.circular(10), color: tileBackgroundColor),
|
||||||
color: Theme.of(context).extension<FilterTheme>()!.buttonColor),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
@ -258,6 +272,7 @@ class AddressTile extends StatelessWidget {
|
||||||
required this.amount,
|
required this.amount,
|
||||||
required this.address,
|
required this.address,
|
||||||
required this.itemSubTitleTextStyle,
|
required this.itemSubTitleTextStyle,
|
||||||
|
required this.tileBackgroundColor,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String itemTitle;
|
final String itemTitle;
|
||||||
|
@ -267,6 +282,7 @@ class AddressTile extends StatelessWidget {
|
||||||
final String amount;
|
final String amount;
|
||||||
final String address;
|
final String address;
|
||||||
final TextStyle itemSubTitleTextStyle;
|
final TextStyle itemSubTitleTextStyle;
|
||||||
|
final Color tileBackgroundColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -283,7 +299,7 @@ class AddressTile extends StatelessWidget {
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: Theme.of(context).extension<FilterTheme>()!.buttonColor,
|
color: tileBackgroundColor,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
@ -343,6 +359,7 @@ class AddressExpansionTile extends StatelessWidget {
|
||||||
required this.isBatchSending,
|
required this.isBatchSending,
|
||||||
required this.itemTitleTextStyle,
|
required this.itemTitleTextStyle,
|
||||||
required this.itemSubTitleTextStyle,
|
required this.itemSubTitleTextStyle,
|
||||||
|
required this.tileBackgroundColor,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String contactType;
|
final String contactType;
|
||||||
|
@ -353,6 +370,7 @@ class AddressExpansionTile extends StatelessWidget {
|
||||||
final bool isBatchSending;
|
final bool isBatchSending;
|
||||||
final TextStyle itemTitleTextStyle;
|
final TextStyle itemTitleTextStyle;
|
||||||
final TextStyle itemSubTitleTextStyle;
|
final TextStyle itemSubTitleTextStyle;
|
||||||
|
final Color tileBackgroundColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -369,7 +387,7 @@ class AddressExpansionTile extends StatelessWidget {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
color: Theme.of(context).extension<FilterTheme>()!.buttonColor,
|
color: tileBackgroundColor,
|
||||||
),
|
),
|
||||||
child: Theme(
|
child: Theme(
|
||||||
data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
|
data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
|
||||||
|
@ -383,7 +401,9 @@ class AddressExpansionTile extends StatelessWidget {
|
||||||
title: Row(
|
title: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: Text(isBatchSending ? name : contactType, style: itemTitleTextStyle, softWrap: true)),
|
Expanded(
|
||||||
|
child: Text(isBatchSending ? name : contactType,
|
||||||
|
style: itemTitleTextStyle, softWrap: true)),
|
||||||
Text(isBatchSending ? amount : name,
|
Text(isBatchSending ? amount : name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
|
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
|
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
import 'package:cake_wallet/themes/theme_base.dart';
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -33,13 +34,17 @@ class _StandardSlideButtonState extends State<StandardSlideButton> {
|
||||||
final double effectiveMaxWidth = maxWidth - 2 * sideMargin;
|
final double effectiveMaxWidth = maxWidth - 2 * sideMargin;
|
||||||
const double sliderWidth = 42.0;
|
const double sliderWidth = 42.0;
|
||||||
|
|
||||||
|
final tileBackgroundColor = widget.currentTheme.type == ThemeType.light
|
||||||
|
? Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor
|
||||||
|
: widget.currentTheme.type == ThemeType.oled
|
||||||
|
? Colors.black.withOpacity(0.5)
|
||||||
|
: Theme.of(context).extension<FilterTheme>()!.buttonColor;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: widget.height,
|
height: widget.height,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: widget.currentTheme.type == ThemeType.light || widget.currentTheme.type == ThemeType.bright
|
color: tileBackgroundColor),
|
||||||
? Theme.of(context).disabledColor
|
|
||||||
: widget.currentTheme.type == ThemeType.oled ? Colors.black : Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor),
|
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
children: [
|
children: [
|
||||||
|
@ -74,11 +79,11 @@ class _StandardSlideButtonState extends State<StandardSlideButton> {
|
||||||
height: widget.height - 8,
|
height: widget.height - 8,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: widget.currentTheme.type == ThemeType.bright ? Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor : Theme.of(context).extension<FilterTheme>()!.buttonColor,
|
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||||
),
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Icon(Icons.arrow_forward,
|
child: Icon(Icons.arrow_forward,
|
||||||
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
|
color: widget.currentTheme.type == ThemeType.bright ? Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor : Theme.of(context).extension<FilterTheme>()!.buttonColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue