mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
copy to clipboard
This commit is contained in:
parent
a75f2edf04
commit
f08986efd6
1 changed files with 13 additions and 2 deletions
|
@ -2,10 +2,12 @@ import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/receive/widgets/address_list_item.dart';
|
import 'package:cake_wallet/src/screens/receive/widgets/address_list_item.dart';
|
||||||
import 'package:cake_wallet/src/widgets/search_bar_widget.dart';
|
import 'package:cake_wallet/src/widgets/search_bar_widget.dart';
|
||||||
|
import 'package:cake_wallet/utils/show_bar.dart';
|
||||||
import 'package:cw_bitcoin/bitcoin_address_record.dart';
|
import 'package:cw_bitcoin/bitcoin_address_record.dart';
|
||||||
import 'package:cw_bitcoin/electrum_wallet.dart';
|
import 'package:cw_bitcoin/electrum_wallet.dart';
|
||||||
import 'package:cw_core/wallet_base.dart';
|
import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
class AddressListPage extends BasePage {
|
class AddressListPage extends BasePage {
|
||||||
|
@ -84,8 +86,17 @@ class _AddressListBodyState extends State<AddressListBody> {
|
||||||
separatorBuilder: (_, __) => SizedBox(height: 15),
|
separatorBuilder: (_, __) => SizedBox(height: 15),
|
||||||
itemBuilder: (_, int index) {
|
itemBuilder: (_, int index) {
|
||||||
final item = filteredAddresses[index];
|
final item = filteredAddresses[index];
|
||||||
return AddressListItem(
|
return GestureDetector(
|
||||||
address: item.address, isChange: item.isHidden);
|
onTap: () {
|
||||||
|
Clipboard.setData(ClipboardData(text: item.address));
|
||||||
|
showBar<void>(
|
||||||
|
context,
|
||||||
|
S.of(context).transaction_details_copied(
|
||||||
|
S.of(context).address));
|
||||||
|
},
|
||||||
|
child: AddressListItem(
|
||||||
|
address: item.address, isChange: item.isHidden),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue