Merge remote-tracking branch 'origin/dev' into CW-1529-Improved-Seed-UI

# Conflicts:
#	lib/new-ui/pages/home_page.dart
#	res/values/strings_ar.arb
#	res/values/strings_bg.arb
#	res/values/strings_cs.arb
#	res/values/strings_es.arb
#	res/values/strings_fa.arb
#	res/values/strings_fr.arb
#	res/values/strings_gn.arb
#	res/values/strings_ha.arb
#	res/values/strings_hi.arb
#	res/values/strings_hr.arb
#	res/values/strings_hy.arb
#	res/values/strings_id.arb
#	res/values/strings_it.arb
#	res/values/strings_ja.arb
#	res/values/strings_ko.arb
#	res/values/strings_my.arb
#	res/values/strings_nl.arb
#	res/values/strings_pl.arb
#	res/values/strings_pt.arb
#	res/values/strings_pt_BR.arb
#	res/values/strings_ru.arb
#	res/values/strings_th.arb
#	res/values/strings_tl.arb
#	res/values/strings_tr.arb
#	res/values/strings_uk.arb
#	res/values/strings_ur.arb
#	res/values/strings_vi.arb
#	res/values/strings_yo.arb
#	res/values/strings_zh.arb
This commit is contained in:
Blazebrain
2026-09-15 10:45:35 +01:00
116 changed files with 6791 additions and 893 deletions
+7 -54
View File
@@ -3,6 +3,7 @@ import 'package:cake_wallet/core/address_resolver/address_resolver_service.dart'
import 'package:cake_wallet/core/address_validator.dart';
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/new-ui/widgets/buy_sell/buy_sell_selector_modal.dart';
import 'package:cake_wallet/new-ui/widgets/currency_picker/currency_picker_args.dart';
import 'package:cake_wallet/new-ui/widgets/currency_picker/currency_picker_sheet.dart';
import 'package:cake_wallet/new-ui/widgets/currency_picker/fiat_currency_picker_sheet.dart';
@@ -410,21 +411,9 @@ class BuySellPage extends BasePage {
currencyButtonColor: Colors.transparent,
addressButtonsColor: Theme.of(context).colorScheme.surfaceContainerHighest,
borderColor: Theme.of(context).colorScheme.outlineVariant,
onPushPasteButton: (context) async {
final domain = cryptoCurrencyKey.currentState!.addressController.text;
final parsed = await fetchParsedAddress(context, domain, buySellViewModel.cryptoCurrency);
if (parsed.isNotEmpty) {
buySellViewModel.cryptoCurrencyAddress = parsed;
}
},
onPushAddressBookButton: (context) async {
final domain = cryptoCurrencyKey.currentState!.addressController.text;
final parsed = await fetchParsedAddress(context, domain, buySellViewModel.cryptoCurrency);
if (parsed.isNotEmpty) {
buySellViewModel.cryptoCurrencyAddress = parsed;
}
},
fillColor: buySellViewModel.isBuyAction
onPushPasteButton: (context) async {},
onPushAddressBookButton: (context) async {},
fillColor: buySellViewModel.mode == BuySellPageMode.buy
? Theme.of(context).colorScheme.surfaceContainer
: Theme.of(context).colorScheme.surfaceContainerLow,
),
@@ -463,7 +452,7 @@ class BuySellPage extends BasePage {
addressTextFieldValidator: AddressValidator(type: buySellViewModel.cryptoCurrency),
onPushPasteButton: (context) async {},
onPushAddressBookButton: (context) async {},
fillColor: buySellViewModel.isBuyAction
fillColor: buySellViewModel.mode == BuySellPageMode.buy
? Theme.of(context).colorScheme.surfaceContainerLow
: Theme.of(context).colorScheme.surfaceContainer,
useSatoshis: buySellViewModel.useSatoshi,
@@ -473,50 +462,14 @@ class BuySellPage extends BasePage {
if (responsiveLayoutUtil.shouldRenderMobileUI) {
return Observer(
builder: (_) {
if (buySellViewModel.isBuyAction) {
return MobileExchangeCardsSection(
firstExchangeCard: fiatExchangeCard,
secondExchangeCard: cryptoExchangeCard,
onBuyTap: () => null,
onSellTap: () =>
buySellViewModel.isBuyAction ? buySellViewModel.changeBuySellAction() : null,
isBuySellOption: true,
);
} else {
return MobileExchangeCardsSection(
firstExchangeCard: cryptoExchangeCard,
secondExchangeCard: fiatExchangeCard,
onBuyTap: () =>
!buySellViewModel.isBuyAction ? buySellViewModel.changeBuySellAction() : null,
onSellTap: () => null,
isBuySellOption: true,
);
}
return Placeholder();
},
);
}
return Observer(
builder: (_) {
if (buySellViewModel.isBuyAction) {
return DesktopExchangeCardsSection(
firstExchangeCard: fiatExchangeCard,
secondExchangeCard: cryptoExchangeCard,
onBuyTap: () => null,
onSellTap: () =>
buySellViewModel.isBuyAction ? buySellViewModel.changeBuySellAction() : null,
isBuySellOption: true,
);
} else {
return DesktopExchangeCardsSection(
firstExchangeCard: cryptoExchangeCard,
secondExchangeCard: fiatExchangeCard,
onBuyTap: () =>
!buySellViewModel.isBuyAction ? buySellViewModel.changeBuySellAction() : null,
onSellTap: () => null,
isBuySellOption: true,
);
}
return Placeholder();
},
);
}
@@ -1,5 +1,6 @@
import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/core/csv_export_service.dart';
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/entities/balance_display_mode.dart';
import 'package:cake_wallet/order/order_source_description.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/anonpay_transaction_row.dart';
@@ -66,7 +67,8 @@ class TransactionsPage extends StatelessWidget {
}),
HeaderRow(
dashboardViewModel: dashboardViewModel,
onExportCsv: () => CsvExportService().exportToCsv(dashboardViewModel.items, context),
onExportCsv: () =>
getIt.get<CsvExportService>().exportToCsv(dashboardViewModel.items, context),
key: ValueKey('transactions_page_header_row_key'),
),
Expanded(
+5 -1
View File
@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:vector_graphics/vector_graphics.dart';
@@ -130,7 +131,10 @@ class CakeImageWidget extends StatelessWidget {
/// A caller-supplied [loadingWidget] owns its own semantics; the built-in
/// spinner is purely visual and must not become an unnamed focus stop.
Widget _buildLoadingWidget() =>
loadingWidget ?? const ExcludeSemantics(child: Center(child: CircularProgressIndicator()));
loadingWidget ?? ExcludeSemantics(child:SizedBox(
height: height,
width: width,
child: Center(child: CupertinoActivityIndicator())));
Widget _buildErrorWidget(BuildContext context) {
final Widget placeholder = Container(
@@ -29,31 +29,29 @@ class ListItemDropdownWidget extends StatelessWidget {
return ListItemStyleWrapper(
isFirstInSection: isFirstInSection,
isLastInSection: isLastInSection,
onTap: onTap,
builder: (context, textStyle, labelStyle) {
return InkWell(
onTap: onTap,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(label, style: textStyle),
Row(
children: [
if (trailingText != null)
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Text(
trailingText!,
style: labelStyle,
),
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(label, style: textStyle),
Row(
children: [
if (trailingText != null)
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Text(
trailingText!,
style: labelStyle,
),
Icon(
Icons.keyboard_arrow_down,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
],
),
],
),
Icon(
Icons.keyboard_arrow_down,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
],
),
],
);
},
);
@@ -23,22 +23,26 @@ class ListItemRegularRowWidget extends StatelessWidget {
this.foregroundColor,
this.trailingIconSize,
this.bottomWidget,
this.subtitleColor,
this.trailingWidget,
this.copyableText,
this.leadingIconErrorWidget,
this.leadingIconSize,
this.badgeIconSize,
this.iconColor});
this.iconColor,
this.secondaryLabel});
final String keyValue;
final String label;
final String? subtitle;
final String? trailingText;
final String? secondaryLabel;
final String? iconPath;
final String? badgeIconPath;
final VoidCallback? onTap;
final bool isFirstInSection;
final bool isLastInSection;
final Color? subtitleColor;
final bool showArrow;
final String? trailingIconPath;
final Widget? bottomWidget;
@@ -143,14 +147,28 @@ class ListItemRegularRowWidget extends StatelessWidget {
color: Theme.of(context).colorScheme.primary),
)
else
Text(label,
style: foregroundColor == null
? textStyle
: textStyle.copyWith(color: foregroundColor)),
Row(
spacing: 4,
children: [
Text(label,
style: foregroundColor == null
? textStyle
: textStyle.copyWith(color: foregroundColor)),
if (secondaryLabel != null)
Text(
secondaryLabel!,
style: textStyle.copyWith(
color:
Theme.of(context).colorScheme.onSurfaceVariant),
)
],
),
if (subtitle != null)
Text(
subtitle!,
style: labelStyle.copyWith(fontSize: 12),
style: subtitleColor == null
? labelStyle.copyWith(fontSize: 12)
: labelStyle.copyWith(fontSize: 12, color: subtitleColor),
),
],
),
@@ -32,30 +32,35 @@ class ListItemSelectorWidget extends StatelessWidget {
onTap: onTap,
isFirstInSection: isFirstInSection,
isLastInSection: isLastInSection,
builder: (context, textStyle, labelStyle) {
return Row(
builder: (context, textStyle, labelStyle) => Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(child: Text(label, style: textStyle)),
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
spacing: 8,
children: [
Text(
options[selectedIndex],
style: labelStyle,
),
CakeImageWidget(
imageUrl: "assets/new-ui/chooser.svg",
colorFilter:
ColorFilter.mode(theme.colorScheme.onSurfaceVariant, BlendMode.srcIn),
),
],
Flexible(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisSize: MainAxisSize.min,
spacing: 8,
children: [
Flexible(
child: Text(
options[selectedIndex],
style: labelStyle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
CakeImageWidget(
imageUrl: "assets/new-ui/chooser.svg",
colorFilter:
ColorFilter.mode(theme.colorScheme.onSurfaceVariant, BlendMode.srcIn),
),
],
),
),
),
],
);
});
));
}
}
@@ -97,6 +97,8 @@ class NewListSections extends StatelessWidget {
iconPath: item.iconPath,
badgeIconPath: item.badgeIconPath,
trailingIconPath: item.trailingIconPath,
secondaryLabel: item.secondaryLabel,
subtitleColor: item.subtitleColor,
onTap: tapHandlers[item.keyValue] ?? item.onTap,
isFirstInSection: isFirst,
isLastInSection: isLast,