fix naming on wallet type page (#3279)

* fix naming on wallet type page

* add long press copy to tx history amount
This commit is contained in:
malik1004x
2026-06-02 16:55:54 +02:00
committed by GitHub
parent 1000e9e462
commit 371c063bc6
5 changed files with 68 additions and 55 deletions
@@ -1,6 +1,7 @@
import 'package:cake_wallet/entities/new_ui_entities/list_item/list_item.dart';
import 'package:cake_wallet/entities/new_ui_entities/list_item/list_item_regular_row.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/new-ui/widgets/copy_wrapper.dart';
import 'package:cake_wallet/new-ui/widgets/receive_page/receive_top_bar.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/transaction_details/confirmations_list_item.dart';
@@ -81,9 +82,17 @@ class _TransactionDetailsModalState extends State<TransactionDetailsModal> {
widget.transactionDetailsViewModel.formattedStatus,
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
),
Text(
widget.transactionDetailsViewModel.formattedCryptoAmount,
style: TextStyle(fontSize: 28),
CopyWrapper(
requireLongPress: true,
data: ClipboardData(text: widget.transactionDetailsViewModel.formattedCryptoAmount),
builder: (context, copied)=> AnimatedSwitcher(
duration: Duration(milliseconds: 300),
child: Text(
key: ValueKey(copied),
copied ? S.of(context).copied : widget.transactionDetailsViewModel.formattedCryptoAmount,
style: TextStyle(fontSize: 28, color: copied ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.onSurface),
),
),
),
Padding(
padding: const EdgeInsets.all(16.0),
+4 -1
View File
@@ -9,12 +9,14 @@ class CopyWrapper extends StatefulWidget {
const CopyWrapper(
{super.key,
this.data,
this.requireLongPress = false,
this.isSensitive = false,
required this.builder,
this.duration = const Duration(milliseconds: 1200)});
final ClipboardData? data;
final bool isSensitive;
final bool requireLongPress;
final Widget Function(BuildContext, bool) builder;
final Duration duration;
@@ -40,7 +42,8 @@ class _CopyWrapperState extends State<CopyWrapper> {
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: handleCopy,
onTap: widget.requireLongPress ? null : handleCopy,
onLongPress: !widget.requireLongPress ? null : handleCopy,
child: widget.builder(context, copied),
);
}
@@ -137,7 +137,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
),
Flexible(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 18),
padding: const EdgeInsets.only(left: 18, right: 18, bottom: 12),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainer,
@@ -172,10 +172,10 @@ class WalletTypeFormState extends State<WalletTypeForm> {
imageUrl: curr.iconPath,
),
const SizedBox(width: 12),
Text(curr.fullName ?? curr.name),
Text(walletTypeToDisplayName(item)),
const SizedBox(width: 4),
Text(
curr.title,
walletTypeToDisplayTicker(item),
style: TextStyle(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),