111
This commit is contained in:
Binary file not shown.
@@ -516,14 +516,17 @@ void showWithdrawDialog(BuildContext context, String? balance) {
|
|||||||
ValueListenableBuilder<String?>(
|
ValueListenableBuilder<String?>(
|
||||||
valueListenable: selectedNetworkNotifier,
|
valueListenable: selectedNetworkNotifier,
|
||||||
builder: (_, selected, __) {
|
builder: (_, selected, __) {
|
||||||
return ShadSelect<String>(
|
return SizedBox(
|
||||||
placeholder: const Text('選擇提現網絡'),
|
width: double.infinity,
|
||||||
initialValue: selected,
|
child: ShadSelect<String>(
|
||||||
selectedOptionBuilder: (context, val) => Text(val),
|
placeholder: const Text('選擇提現網絡'),
|
||||||
onChanged: (value) {
|
initialValue: selected,
|
||||||
if (value != null) selectedNetworkNotifier.value = value;
|
selectedOptionBuilder: (context, val) => Text(val),
|
||||||
},
|
onChanged: (value) {
|
||||||
options: networks.map((n) => ShadOption(value: n, child: Text(n))).toList(),
|
if (value != null) selectedNetworkNotifier.value = value;
|
||||||
|
},
|
||||||
|
options: networks.map((n) => ShadOption(value: n, child: Text(n))).toList(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -358,7 +358,9 @@ class _BillsPageState extends State<BillsPage> with SingleTickerProviderStateMix
|
|||||||
// 福利賬單
|
// 福利賬單
|
||||||
// ============================================
|
// ============================================
|
||||||
Widget _buildWelfareTab(String type) {
|
Widget _buildWelfareTab(String type) {
|
||||||
final records = _welfareRecords.where((r) => r['type'] == type).toList();
|
final records = _welfareRecords
|
||||||
|
.where((r) => r['type'] == type && r['status'] == 1)
|
||||||
|
.toList();
|
||||||
|
|
||||||
if (records.isEmpty) {
|
if (records.isEmpty) {
|
||||||
return _buildEmptyState(
|
return _buildEmptyState(
|
||||||
|
|||||||
@@ -205,7 +205,9 @@ class _TradePageState extends State<TradePage>
|
|||||||
|
|
||||||
void _fillPercent(double pct) {
|
void _fillPercent(double pct) {
|
||||||
final max = double.tryParse(_maxAmount) ?? 0;
|
final max = double.tryParse(_maxAmount) ?? 0;
|
||||||
_amountController.text = (max * pct).toStringAsFixed(2);
|
final value = max * pct;
|
||||||
|
// 向下截斷到2位小數,避免四捨五入超出可用餘額
|
||||||
|
_amountController.text = ((value * 100).truncateToDouble() / 100).toStringAsFixed(2);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user