logo和名称替换

This commit is contained in:
谢宇宁
2026-10-14 11:23:36 +07:00
parent 1cb514cd02
commit c5c04a7967
478 changed files with 8990 additions and 4948 deletions
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'mine_withdrawal_record_page.dart';
@@ -35,14 +35,17 @@ class WithDrawalRecordController extends MineWithdrawalRecordLogic {
fetchPageData({bool isRefresh = true}) async {
super.fetchPageData(isRefresh: isRefresh);
final result = await MineService.getWithdrawDetails(pageNumber: page, pageSize: 10);
final result =
await MineService.getWithdrawDetails(pageNumber: page, pageSize: 10);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
result?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
result?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(result?.list ?? []);
page += 1;
update();
@@ -69,7 +72,9 @@ class GoldBillRecordController extends MineWithdrawalRecordLogic {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -86,13 +91,16 @@ class RechargeRecordController extends MineWithdrawalRecordLogic {
@override
fetchPageData({bool isRefresh = true}) async {
super.fetchPageData(isRefresh: isRefresh);
final res = await MineService.getRechargeBill(pageNumber: page, pageSize: 15);
final res =
await MineService.getRechargeBill(pageNumber: page, pageSize: 15);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -112,13 +120,16 @@ class IncomeRecordController extends MineWithdrawalRecordLogic {
@override
fetchPageData({bool isRefresh = true}) async {
super.fetchPageData(isRefresh: isRefresh);
final res = await MineService.getIncomeRecord(pageNumber: page, pageSize: 15);
final res =
await MineService.getIncomeRecord(pageNumber: page, pageSize: 15);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import 'mine_withdrawal_record_logic.dart';
@@ -40,16 +40,20 @@ class _RecordsPageState extends State<RecordsPage> {
appBar: AppBar(title: Text(widget.type.title)),
body: pullYsRefresh(
onRefresh: (refreshController) => controller.fetchPageData(),
onLoading: (refreshController) => controller.fetchPageData(isRefresh: false),
onLoading: (refreshController) =>
controller.fetchPageData(isRefresh: false),
onInit: (ctr) => controller.refreshController = ctr,
child: () {
if (controller.isLoading) return LoadingCenterWidget();
if (controller.dataSource.isEmpty) return CErrorWidget(retryOnTap: () => controller.fetchPageData());
if (controller.dataSource.isEmpty)
return CErrorWidget(
retryOnTap: () => controller.fetchPageData());
return ListView.builder(
itemCount: controller.dataSource.length,
padding: EdgeInsets.only(top: 12, left: 16.w, right: 16.w),
itemBuilder: (context, index) => controller.instanceChildItem(index),
itemBuilder: (context, index) =>
controller.instanceChildItem(index),
);
}(),
),
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:hgmj/hj_model/mine/exchange/bill_item_model.dart';
import 'package:hgmj/hj_utils/date_time_util.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/extension/extensions.dart';
import 'package:wydj/hj_model/mine/exchange/bill_item_model.dart';
import 'package:wydj/hj_utils/date_time_util.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/toast.dart';
import '../withdraw_details_model.dart';
@@ -27,19 +27,28 @@ class GoldRecordItem extends StatelessWidget {
12.sizeBoxH,
Text(
model.desc ?? '',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
),
4.sizeBoxH,
Text(
model.createdAt.utcToYMDHM(),
style: TextStyle(color: Colors.white.withValues(alpha: .5), fontSize: 12, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white.withValues(alpha: .5),
fontSize: 12,
fontWeight: FontWeight.w400),
),
4.sizeBoxH,
Text(
model.tranType ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Color(0xFFFFC000), fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Color(0xFFFFC000),
fontSize: 14,
fontWeight: FontWeight.w400),
),
12.sizeBoxH,
1.line,
@@ -51,12 +60,18 @@ class GoldRecordItem extends StatelessWidget {
12.sizeBoxH,
Text(
'${model.realCount}${model.unit}',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
),
4.sizeBoxH,
Text(
'余额:${model.realAmount}',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
),
],
)
@@ -101,7 +116,10 @@ class RechargeRecordItem extends StatelessWidget {
'账单编号' + ': ${model.orderId}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14, color: Color(0xE5FFFFFF), fontWeight: FontWeight.w500),
style: TextStyle(
fontSize: 14,
color: Color(0xE5FFFFFF),
fontWeight: FontWeight.w500),
),
),
2.sizeBoxW,
@@ -178,7 +196,10 @@ class InComeRecordItem extends StatelessWidget {
children: [
Text(
"${model.tranType}",
style: const TextStyle(color: Color(0xFFEFEFEF), fontWeight: FontWeight.w500, fontSize: 14.0),
style: const TextStyle(
color: Color(0xFFEFEFEF),
fontWeight: FontWeight.w500,
fontSize: 14.0),
),
Container(
margin: EdgeInsets.symmetric(vertical: 4),
@@ -189,15 +210,24 @@ class InComeRecordItem extends StatelessWidget {
),
Text(
DateTimeUtil.utc2iso(model.createdAt ?? ''),
style: const TextStyle(color: Color(0xFF525252), fontWeight: FontWeight.w400, fontSize: 12.0),
style: const TextStyle(
color: Color(0xFF525252),
fontWeight: FontWeight.w400,
fontSize: 12.0),
),
12.sizeBoxH,
],
),
),
12.sizeBoxW,
Text(model.tranTypeInt == 111 ? "+${model.actualAmount}次" : "+${model.actualAmount}金币",
style: const TextStyle(color: const Color(0xffFFC000), fontWeight: FontWeight.w400, fontSize: 12.0),
Text(
model.tranTypeInt == 111
? "+${model.actualAmount}次"
: "+${model.actualAmount}金币",
style: const TextStyle(
color: const Color(0xffFFC000),
fontWeight: FontWeight.w400,
fontSize: 12.0),
textAlign: TextAlign.left)
],
),
@@ -228,7 +258,10 @@ class _WithdrawalRecordItemState extends State<WithdrawalRecordItem> {
12.sizeBoxH,
Text(
'${(model.money ?? 0) ~/ 100}元',
style: TextStyle(fontSize: 14, color: AppColors.actionRed, fontWeight: FontWeight.w500),
style: TextStyle(
fontSize: 14,
color: AppColors.actionRed,
fontWeight: FontWeight.w500),
),
6.sizeBoxH,
Row(
@@ -238,7 +271,10 @@ class _WithdrawalRecordItemState extends State<WithdrawalRecordItem> {
'账单编号' + ': ${model.id}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14, color: Color(0xE5FFFFFF), fontWeight: FontWeight.w500),
style: TextStyle(
fontSize: 14,
color: Color(0xE5FFFFFF),
fontWeight: FontWeight.w500),
),
),
InkWell(
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/user/wallet_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_helper.dart';
import 'package:wydj/hj_model/user/wallet_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_helper.dart';
import '../../../alert/mine/vip_level_dialog.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/tools_base/toast.dart';
import '../../../track_event_manager/device_service.dart';
import '../mine_profit/bank_card_home_page.dart';
import '../mine_profit/model/alipay_bank_list_model.dart';
@@ -56,8 +56,11 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
void changeWithdrawType(String payType) {
// withdrawType = value;
selectChannel = configData?.channels?.firstWhere((element) => element.payType == payType);
withdrawType = configData?.channels?.indexWhere((e) => e.payType == selectChannel?.payType) ?? 0;
selectChannel = configData?.channels
?.firstWhere((element) => element.payType == payType);
withdrawType = configData?.channels
?.indexWhere((e) => e.payType == selectChannel?.payType) ??
0;
update();
}
@@ -74,7 +77,8 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
actualAmount = withdrawAmoutNum;
} else {
double value = coinTax / 100.0;
final res = (withdrawAmoutNum * double.parse(value.toStringAsFixed(2))).toStringAsFixed(2);
final res = (withdrawAmoutNum * double.parse(value.toStringAsFixed(2)))
.toStringAsFixed(2);
handlingFee = double.parse(res).floor();
actualAmount = withdrawAmoutNum - handlingFee;
}
@@ -105,14 +109,18 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
this.configData = configData;
isLoading = false;
// 优先银行卡,其次 usdt
selectChannel = configData?.channels?.firstWhereOrNull((element) => element.payType == 'bankcard') ??
configData?.channels?.firstWhereOrNull((element) => element.payType == 'usdt');
selectChannel = configData?.channels
?.firstWhereOrNull((element) => element.payType == 'bankcard') ??
configData?.channels
?.firstWhereOrNull((element) => element.payType == 'usdt');
if (selectChannel == null) {
showToast('暂无可用提现通道');
this.configData = null;
} else {
// 必须同步 withdrawType,页面按 channels[withdrawType] 取值,否则会索引错位甚至越界
withdrawType = configData?.channels?.indexWhere((e) => e.payType == selectChannel?.payType) ?? 0;
withdrawType = configData?.channels
?.indexWhere((e) => e.payType == selectChannel?.payType) ??
0;
}
update();
}
@@ -128,7 +136,8 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
if ("bankcard" == selectChannel?.payType) {
//检验银行卡信息
_commonWithdrawReq(true);
} else if ("alipay" == selectChannel?.payType || "usdt" == selectChannel?.payType) {
} else if ("alipay" == selectChannel?.payType ||
"usdt" == selectChannel?.payType) {
_commonWithdrawReq(false);
}
} catch (e) {
+115 -48
View File
@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_page/mine/widgets/gradient_text.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_page/mine/widgets/gradient_text.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:provider/provider.dart';
import '../../../assets_tool/app_colors.dart';
@@ -63,14 +63,16 @@ class WithdrawalPage extends StatelessWidget {
children: [
Expanded(
child: SingleChildScrollView(
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
keyboardDismissBehavior:
ScrollViewKeyboardDismissBehavior.onDrag,
child: Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 12.w, bottom: 18.w),
margin:
EdgeInsets.only(top: 12.w, bottom: 18.w),
padding: EdgeInsets.symmetric(vertical: 12.w),
decoration: BoxDecoration(
color: Color(0x0DFFFFFF),
@@ -106,20 +108,33 @@ class WithdrawalPage extends StatelessWidget {
Padding(
padding: EdgeInsets.only(left: 20),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Image.asset('coin_icon.webp'.mineImgPath, width: 30),
Image.asset(
'coin_icon.webp'.mineImgPath,
width: 30),
4.sizeBoxW,
Consumer<GlobalStore>(builder: (_, store, __) {
logic.userIncomeModel = store.wallet;
Consumer<GlobalStore>(
builder: (_, store, __) {
logic.userIncomeModel =
store.wallet;
return GradientText(
((store.wallet?.balance ?? 0) * 10 / 100).toStringAsFixed(2),
((store.wallet?.balance ?? 0) *
10 /
100)
.toStringAsFixed(2),
gradient: LinearGradient(
colors: [Color(0xffFFE8BE), Color(0xffE6B764)],
colors: [
Color(0xffFFE8BE),
Color(0xffE6B764)
],
tileMode: TileMode.mirror,
),
style: TextStyle(
fontSize: 31.5, fontWeight: FontWeight.w500), //目前fontSize设置为31.5 设置为32,显示不完全,存在系统bug
fontSize: 31.5,
fontWeight: FontWeight
.w500), //目前fontSize设置为31.5 设置为32,显示不完全,存在系统bug
);
}),
],
@@ -131,12 +146,14 @@ class WithdrawalPage extends StatelessWidget {
children: [
Text(
'提现币类:',
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
15.sizeBoxW,
Text(
'人民币',
style: textStyle(14, Color(0x8CFFFFFF), FontWeight.w400),
style: textStyle(
14, Color(0x8CFFFFFF), FontWeight.w400),
),
],
),
@@ -145,34 +162,48 @@ class WithdrawalPage extends StatelessWidget {
children: [
Text(
"提现金额:",
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
10.sizeBoxW,
Expanded(
child: Container(
alignment: Alignment.centerLeft,
height: 40,
padding: EdgeInsets.symmetric(horizontal: 12),
padding:
EdgeInsets.symmetric(horizontal: 12),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
color:
Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(6),
),
child: TextField(
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
FilteringTextInputFormatter.allow(
RegExp("[0-9]")),
LengthLimitingTextInputFormatter(9),
],
controller: logic.moneyController,
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
cursorColor: Colors.white.withValues(alpha: 0.7),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
cursorColor:
Colors.white.withValues(alpha: 0.7),
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.only(bottom: 8),
hintStyle: TextStyle(color: Color(0xFF525252), fontSize: 12, fontWeight: FontWeight.w400),
hintText: '单笔提现金额范围 ${_getPayMoneyRange(logic)}元', //"您目前
contentPadding:
EdgeInsets.only(bottom: 8),
hintStyle: TextStyle(
color: Color(0xFF525252),
fontSize: 12,
fontWeight: FontWeight.w400),
hintText:
'单笔提现金额范围 ${_getPayMoneyRange(logic)}元', //"您目前
),
focusNode: logic.focusNode,
onChanged: (value) => logic.calcWithdrawAmount(value)),
onChanged: (value) =>
logic.calcWithdrawAmount(value)),
),
)
],
@@ -182,7 +213,8 @@ class WithdrawalPage extends StatelessWidget {
children: [
Text(
"提现方式:",
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
16.sizeBoxW,
Expanded(
@@ -193,7 +225,10 @@ class WithdrawalPage extends StatelessWidget {
child: Row(
children: logic.configData?.realChannel
.asMap()
.map((index, e) => MapEntry(index, _buildPayTypeUI(e, logic, index)))
.map((index, e) => MapEntry(
index,
_buildPayTypeUI(
e, logic, index)))
.values
.toList() ??
[],
@@ -209,27 +244,34 @@ class WithdrawalPage extends StatelessWidget {
if (_isUsdt(logic)) ...[
Text(
'USDT地址:',
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
10.sizeBoxW,
Expanded(
child: Container(
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
color:
Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(6),
),
child: TextField(
textAlignVertical: TextAlignVertical.center,
textAlignVertical:
TextAlignVertical.center,
controller: logic.accountController,
maxLines: 1,
decoration: InputDecoration(
border: InputBorder.none,
hintText: _getHintText(logic),
hintStyle: TextStyle(color: Color(0xff999999), fontSize: 14, fontWeight: FontWeight.w400),
hintStyle: TextStyle(
color: Color(0xff999999),
fontSize: 14,
fontWeight: FontWeight.w400),
isCollapsed: true,
contentPadding: EdgeInsets.symmetric(
horizontal: 12,
vertical: (32 - textPainter.height) / 2,
vertical:
(32 - textPainter.height) / 2,
),
),
style: TextStyle(
@@ -243,18 +285,21 @@ class WithdrawalPage extends StatelessWidget {
] else ...[
Text(
'银行卡号:',
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
10.sizeBoxW,
Expanded(
child: InkWell(enableFeedback: false,
child: InkWell(
enableFeedback: false,
onTap: () => logic.gotoBankList(),
child: Container(
alignment: Alignment.centerLeft,
height: 37,
padding: EdgeInsets.only(left: 10),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
color:
Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(6),
),
child: Row(
@@ -267,12 +312,15 @@ class WithdrawalPage extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: logic.bankModel == null ? Color(0xff525252) : Colors.white,
color: logic.bankModel == null
? Color(0xff525252)
: Colors.white,
),
),
),
6.sizeBoxW,
Icon(Icons.keyboard_arrow_right, color: Colors.white, size: 16),
Icon(Icons.keyboard_arrow_right,
color: Colors.white, size: 16),
10.sizeBoxW,
],
),
@@ -287,10 +335,12 @@ class WithdrawalPage extends StatelessWidget {
id: 'money',
builder: (controller) => EasyRichText(
'手续费率: ${logic.configData?.coinTax ?? 0}% 实际到账金额: ${logic.actualAmount}',
defaultStyle: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
defaultStyle: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
patternList: [
EasyRichTextPattern(
targetString: '${logic.configData?.coinTax ?? 0}%',
targetString:
'${logic.configData?.coinTax ?? 0}%',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
@@ -298,7 +348,8 @@ class WithdrawalPage extends StatelessWidget {
),
),
EasyRichTextPattern(
targetString: '实际到账金额: ${logic.handlingFee}',
targetString:
'实际到账金额: ${logic.handlingFee}',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
@@ -319,7 +370,10 @@ class WithdrawalPage extends StatelessWidget {
18.sizeBoxH,
Text(
"提现规则:",
style: const TextStyle(color: Color(0xE5FFFFFF), fontWeight: FontWeight.w500, fontSize: 16.0),
style: const TextStyle(
color: Color(0xE5FFFFFF),
fontWeight: FontWeight.w500,
fontSize: 16.0),
),
12.sizeBoxH,
Text(
@@ -328,7 +382,11 @@ class WithdrawalPage extends StatelessWidget {
"2、每次提现收取${logic.configData?.coinTax}%手续费。\n"
"3、仅支持银行卡提现,收款账户卡号与姓名一致,到账时间未72小时内。\n"
"4、申请提现后请随时关注收款账户进款通知,长时间未到账,请及时联系客服。\n",
style: const TextStyle(color: Color(0x8CFFFFFF), fontWeight: FontWeight.w400, fontSize: 12.0, height: 2),
style: const TextStyle(
color: Color(0x8CFFFFFF),
fontWeight: FontWeight.w400,
fontSize: 12.0,
height: 2),
),
30.sizeBoxH,
],
@@ -370,16 +428,24 @@ class WithdrawalPage extends StatelessWidget {
///支付类型
Widget _buildPayTypeUI(Channel channel, WithdrawalLogic logic, int index) {
bool isSelected = logic.selectChannel?.payType == channel.payType;
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () => logic.changeWithdrawType(channel.payType ?? ''),
child: Row(
children: [
Image.asset(channel.payType == 'usdt' ? 'ic_usdt.png'.mineImgPath : 'ic_union.png'.mineImgPath, width: 30),
Image.asset(
channel.payType == 'usdt'
? 'ic_usdt.png'.mineImgPath
: 'ic_union.png'.mineImgPath,
width: 30),
4.sizeBoxW,
Text(_getPayTypeName(channel.payType ?? ""), style: TextStyle(color: Colors.white, fontSize: 14)),
Text(_getPayTypeName(channel.payType ?? ""),
style: TextStyle(color: Colors.white, fontSize: 14)),
10.sizeBoxW,
Image.asset(
isSelected ? 'radio_sel.png'.commonImgPath : 'mine_withdraw_nor.png'.mineImgPath,
isSelected
? 'radio_sel.png'.commonImgPath
: 'mine_withdraw_nor.png'.mineImgPath,
width: 24,
),
24.sizeBoxW,
@@ -421,7 +487,8 @@ class WithdrawalPage extends StatelessWidget {
}
}
bool _isUsdt(WithdrawalLogic logic) => (_currentChannel(logic)?.payType ?? "") == 'usdt';
bool _isUsdt(WithdrawalLogic logic) =>
(_currentChannel(logic)?.payType ?? "") == 'usdt';
// 按 withdrawType 取当前通道,带越界保护(配置异常时不崩溃)
Channel? _currentChannel(WithdrawalLogic logic) {