Submit customer identity proofs and show reviewed limits
This commit is contained in:
1 parent
7bf8b8087a
commit
1354551ae8
50 files changed
+1777
-67
No files matched your search
@@ -0,0 +1,55 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:sxchnge_kyc/sxchnge_kyc.dart';
|
||||
|
||||
import '../generated/i18n/app_localizations.dart';
|
||||
|
||||
/// Display exact provider decimals; never infer currency scale or active caps.
|
||||
class PolicyRow extends StatelessWidget {
|
||||
const PolicyRow({super.key, required this.row});
|
||||
final PolicyLimit row;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l = AppLocalizations.of(context)!;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Divider(height: 32),
|
||||
Text(
|
||||
'${row.operation} · ${switch (row.period) {
|
||||
'day' => l.kycDay,
|
||||
'month' => l.kycMonth,
|
||||
'operationMin' => l.kycOperationMinimum,
|
||||
'operationMax' => l.kycOperationMaximum,
|
||||
_ => row.period,
|
||||
}}',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Wrap(
|
||||
spacing: 28,
|
||||
runSpacing: 16,
|
||||
children: [
|
||||
_amount(context, l.kycCurrent, row.cap),
|
||||
if (row.remaining.isNotEmpty)
|
||||
_amount(context, l.kycRemaining, row.remaining),
|
||||
if (row.used.isNotEmpty) _amount(context, l.wUsage, row.used),
|
||||
if (row.reserved.isNotEmpty)
|
||||
_amount(context, l.kycReserved, row.reserved),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _amount(BuildContext context, String label, String amount) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(label),
|
||||
Text(
|
||||
'$amount ${row.currency}',
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user