CW-942-New-Swap-UI-Flow (#2036)

* feat: Implement New Swap UI including fee items and coin control and extract common fee logic to a feeViewModel, use that in SendViewModel and ExchangeViewModel

* feat: Implement New Swap UI with fee items and coin control and extract common fee logic to a feeViewModel for use in SendViewModel and ExchangeViewModel

* Update colors

* Show warning if user choose a below default transaction priority

* fix: Add warning when user select less than default transaction priority and add condition to show extraId

* Complete Swap UI flow

* Handle edgecases for XRP

* Switch swap page button texts

* Handle edgecases for XLM

* Switch prompt text and handle edgecases

---------

Co-authored-by: tuxpizza <tuxsudo@tux.pizza>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
David Adegoke
2025-03-14 18:31:31 +02:00
committed by GitHub
co-authored by tuxpizza Omar Hatem
parent 0f301a71a2
commit 9f3078740e
48 changed files with 1048 additions and 327 deletions
+19 -12
View File
@@ -1,30 +1,37 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
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(
{required this.title,
required this.value,
this.titleFontSize = 14,
this.valueFontSize = 16,
this.image});
ListRow({
required this.title,
required this.value,
this.titleFontSize = 14,
this.valueFontSize = 16,
this.image,
this.padding,
this.color,
this.hintTextColor,
this.mainTextColor
});
final String title;
final String value;
final double titleFontSize;
final double valueFontSize;
final Image? image;
final EdgeInsetsGeometry? padding;
final Color? color;
final Color? hintTextColor;
final Color? mainTextColor;
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
color: Theme.of(context).colorScheme.background,
color: color ?? Theme.of(context).colorScheme.background,
child: Padding(
padding:
const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
padding: padding ?? const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@@ -32,7 +39,7 @@ class ListRow extends StatelessWidget {
style: TextStyle(
fontSize: titleFontSize,
fontWeight: FontWeight.w500,
color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor),
color: hintTextColor ?? Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor),
textAlign: TextAlign.left),
Padding(
padding: const EdgeInsets.only(top: 12),
@@ -46,7 +53,7 @@ class ListRow extends StatelessWidget {
style: TextStyle(
fontSize: valueFontSize,
fontWeight: FontWeight.w500,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
color: mainTextColor ?? Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
),
image != null
? Padding(