Some checks failed
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/bff Pipeline failed
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/bump_version unknown status
ci/woodpecker/push/payments_orchestrator Pipeline was successful
49 lines
1.3 KiB
Dart
49 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:pweb/pages/dashboard/buttons/balance/amount.dart';
|
|
import 'package:pweb/providers/wallets.dart';
|
|
|
|
|
|
class WalletEditFields extends StatelessWidget {
|
|
|
|
const WalletEditFields({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final wallet = context.watch<WalletsProvider>().wallets?.first;
|
|
|
|
if (wallet == null) {
|
|
return const SizedBox.shrink();
|
|
}
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
BalanceAmount(
|
|
wallet: wallet,
|
|
onToggleVisibility: () {
|
|
context.read<WalletsProvider>().toggleVisibility(wallet.id);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 8),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(wallet.walletUserID, style: Theme.of(context).textTheme.bodyLarge),
|
|
IconButton(
|
|
icon: Icon(Icons.copy),
|
|
iconSize: 18,
|
|
onPressed: () => Clipboard.setData(ClipboardData(text: wallet.walletUserID)),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
);
|
|
}
|
|
} |