mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
fix: Background color for swap screen and external send details screen looking wierd across themes (#2151)
This commit is contained in:
parent
79fe9da6b7
commit
b80afb1efe
2 changed files with 24 additions and 32 deletions
|
@ -19,9 +19,6 @@ class ExchangeTradeExternalSendPage extends BasePage {
|
|||
@override
|
||||
String get title => S.current.swap;
|
||||
|
||||
@override
|
||||
bool get gradientBackground => true;
|
||||
|
||||
@override
|
||||
bool get gradientAll => true;
|
||||
|
||||
|
@ -46,7 +43,7 @@ class ExchangeTradeExternalSendPage extends BasePage {
|
|||
);
|
||||
return Container(
|
||||
child: ScrollableWithBottomSection(
|
||||
contentPadding: EdgeInsets.only(top: 36, bottom: 24),
|
||||
contentPadding: EdgeInsets.only(bottom: 24),
|
||||
content: Observer(
|
||||
builder: (_) {
|
||||
return Column(
|
||||
|
|
|
@ -26,23 +26,20 @@ 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) {
|
||||
void showInformation(ExchangeTradeViewModel exchangeTradeViewModel, BuildContext context) {
|
||||
final trade = exchangeTradeViewModel.trade;
|
||||
final walletName = exchangeTradeViewModel.wallet.name;
|
||||
|
||||
final information = exchangeTradeViewModel.isSendable
|
||||
? S.current.exchange_trade_result_confirm(trade.amount, trade.from.toString(), walletName) +
|
||||
exchangeTradeViewModel.extraInfo
|
||||
: S.current.exchange_result_description(
|
||||
trade.amount, trade.from.toString()) +
|
||||
: S.current.exchange_result_description(trade.amount, trade.from.toString()) +
|
||||
exchangeTradeViewModel.extraInfo;
|
||||
|
||||
showPopUp<void>(
|
||||
context: context,
|
||||
builder: (_) => InformationPage(
|
||||
key: ValueKey('information_page_dialog_key'),
|
||||
information: information));
|
||||
builder: (_) =>
|
||||
InformationPage(key: ValueKey('information_page_dialog_key'), information: information));
|
||||
}
|
||||
|
||||
class ExchangeTradePage extends BasePage {
|
||||
|
@ -53,9 +50,6 @@ class ExchangeTradePage extends BasePage {
|
|||
@override
|
||||
String get title => S.current.swap;
|
||||
|
||||
@override
|
||||
bool get gradientBackground => true;
|
||||
|
||||
@override
|
||||
bool get gradientAll => true;
|
||||
|
||||
|
@ -141,7 +135,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
|||
|
||||
return Container(
|
||||
child: ScrollableWithBottomSection(
|
||||
contentPadding: EdgeInsets.only(top: 10, bottom: 16),
|
||||
contentPadding: EdgeInsets.only(bottom: 16),
|
||||
content: Observer(builder: (_) {
|
||||
final trade = widget.exchangeTradeViewModel.trade;
|
||||
|
||||
|
@ -220,7 +214,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
|||
|
||||
_exchangeStateReaction = reaction((_) => this.widget.exchangeTradeViewModel.sendViewModel.state,
|
||||
(ExecutionState state) {
|
||||
|
||||
if (state is! IsExecutingState &&
|
||||
loadingBottomSheetContext != null &&
|
||||
loadingBottomSheetContext!.mounted) {
|
||||
|
@ -272,16 +265,21 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
|||
key: ValueKey('exchange_trade_page_confirm_sending_bottom_sheet_key'),
|
||||
currentTheme: widget.currentTheme,
|
||||
titleText: S.of(bottomSheetContext).confirm_transaction,
|
||||
titleIconPath: widget.exchangeTradeViewModel.sendViewModel.selectedCryptoCurrency.iconPath,
|
||||
titleIconPath:
|
||||
widget.exchangeTradeViewModel.sendViewModel.selectedCryptoCurrency.iconPath,
|
||||
currency: widget.exchangeTradeViewModel.sendViewModel.selectedCryptoCurrency,
|
||||
amount: S.of(bottomSheetContext).send_amount,
|
||||
amountValue: widget.exchangeTradeViewModel.sendViewModel.pendingTransaction!.amountFormatted,
|
||||
fiatAmountValue: widget.exchangeTradeViewModel.sendViewModel.pendingTransactionFiatAmountFormatted,
|
||||
amountValue: widget
|
||||
.exchangeTradeViewModel.sendViewModel.pendingTransaction!.amountFormatted,
|
||||
fiatAmountValue: widget
|
||||
.exchangeTradeViewModel.sendViewModel.pendingTransactionFiatAmountFormatted,
|
||||
fee: isEVMCompatibleChain(widget.exchangeTradeViewModel.sendViewModel.walletType)
|
||||
? S.of(bottomSheetContext).send_estimated_fee
|
||||
: S.of(bottomSheetContext).send_fee,
|
||||
feeValue: widget.exchangeTradeViewModel.sendViewModel.pendingTransaction!.feeFormatted,
|
||||
feeFiatAmount: widget.exchangeTradeViewModel.sendViewModel.pendingTransactionFeeFiatAmountFormatted,
|
||||
feeValue:
|
||||
widget.exchangeTradeViewModel.sendViewModel.pendingTransaction!.feeFormatted,
|
||||
feeFiatAmount: widget.exchangeTradeViewModel.sendViewModel
|
||||
.pendingTransactionFeeFiatAmountFormatted,
|
||||
outputs: widget.exchangeTradeViewModel.sendViewModel.outputs,
|
||||
onSlideComplete: () async {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
|
@ -300,7 +298,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
await showModalBottomSheet<void>(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
|
@ -321,10 +318,8 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
|||
});
|
||||
},
|
||||
);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
_effectsInstalled = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue