mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Add copy icon to block height display (#1978)
This commit is contained in:
@@ -233,13 +233,27 @@ class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
|
||||
? 'Fetching...'
|
||||
: (snapshot.data ?? '---');
|
||||
|
||||
return Text(
|
||||
textToDisplay,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor,
|
||||
),
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
textToDisplay,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor,
|
||||
),
|
||||
),
|
||||
if (snapshot.connectionState == ConnectionState.done && snapshot.data != null)
|
||||
GestureDetector(
|
||||
onTap: () => _onCopy(S.of(context).block_height, snapshot.data!, context),
|
||||
child: Icon(
|
||||
Icons.copy,
|
||||
size: 16,
|
||||
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.7),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user