Add saved payout destination UX and service contracts (#54)
This commit is contained in:
1 parent
a5689876ff
commit
24af794112
49 files changed
+4687
-62
No files matched your search
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:sxchnge_wallet/sxchnge_wallet.dart';
|
||||
|
||||
import '../generated/i18n/app_localizations.dart';
|
||||
|
||||
/// Structured review renders the immutable service snapshot, never a nickname.
|
||||
class DestinationDetailsView extends StatelessWidget {
|
||||
const DestinationDetailsView({super.key, required this.details});
|
||||
final DestinationDetails details;
|
||||
Widget field(String label, String value) => Padding(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [Text(label), SelectableText(value)],
|
||||
),
|
||||
);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l = AppLocalizations.of(context)!;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: switch (details) {
|
||||
CryptoDestination d => [
|
||||
field(l.dAsset, d.assetLabel),
|
||||
field(l.dNetwork, d.networkLabel),
|
||||
field(l.dAddress, d.address),
|
||||
field(l.dMemo, d.memo.isEmpty ? l.dNoMemo : d.memo),
|
||||
],
|
||||
CardDestination d => [field(l.dCard, d.display)],
|
||||
RussianBankDestination d => [
|
||||
field(l.dHolder, d.holder),
|
||||
field(l.dBankSearch, d.bank.name),
|
||||
field(l.dBik, d.bank.bik),
|
||||
field(l.dAccount, d.account),
|
||||
field(l.dCorrespondent, d.bank.correspondent),
|
||||
],
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user