From bed6083976d594c8c077f303d9ed63db564bcd63 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Tue, 26 Jan 2021 15:05:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9D=E3=80=81=E9=93=B6=E8=A1=8C=E5=8D=A1?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=97=B6=EF=BC=8C=E6=8F=90=E7=8E=B0=E8=B4=A6?= =?UTF-8?q?=E6=88=B7=E7=9A=84=E5=A1=AB=E5=86=99=E5=86=85=E5=AE=B9=E4=B9=9F?= =?UTF-8?q?=E8=A6=81=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/user/user_cash_withdraw_page.dart | 23 ++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/pages/user/user_cash_withdraw_page.dart b/lib/pages/user/user_cash_withdraw_page.dart index af82788..cb3ea0c 100644 --- a/lib/pages/user/user_cash_withdraw_page.dart +++ b/lib/pages/user/user_cash_withdraw_page.dart @@ -33,7 +33,9 @@ class _UserCashWithdrawPageState extends BaseStoreState { TextEditingController _amountTextEditController; FocusNode _amountContentFocusNode = FocusNode(); + ///支付宝账号 TextEditingController _accountTextEditController; + TextEditingController _bankAccountTextEditController; FocusNode _accountFocusNodeController = FocusNode(); BottomKeyBoardController _bottomKeyBoardController = BottomKeyBoardController(); @@ -46,6 +48,15 @@ class _UserCashWithdrawPageState extends BaseStoreState { _isNeedUserVerify = !UserManager.instance.user.info.realInfoStatus; _amountTextEditController = TextEditingController(); _accountTextEditController = TextEditingController(); + _bankAccountTextEditController = TextEditingController(); + } + + @override + void dispose() { + _amountTextEditController?.dispose(); + _accountTextEditController?.dispose(); + _bankAccountTextEditController?.dispose(); + super.dispose(); } @override @@ -348,7 +359,9 @@ class _UserCashWithdrawPageState extends BaseStoreState { child: CupertinoTextField( padding: EdgeInsets.all(0), keyboardType: TextInputType.text, - controller: _accountTextEditController, + controller: _isCashToAlipay + ? _accountTextEditController + : _bankAccountTextEditController, textInputAction: TextInputAction.done, onSubmitted: (_submitted) { _accountFocusNodeController.unfocus(); @@ -437,8 +450,12 @@ class _UserCashWithdrawPageState extends BaseStoreState { ), CustomImageButton( onPressed: !_isAgreeTheProtocol || - TextUtils.isEmpty(_accountTextEditController.text) || - TextUtils.isEmpty(_amountTextEditController.text) + TextUtils.isEmpty(_isCashToAlipay + ? _accountTextEditController.text + : _bankAccountTextEditController.text) || + TextUtils.isEmpty(_isCashToAlipay + ? _amountTextEditController.text + : _bankAccountTextEditController.text) ? null : () { if (_isNeedUserVerify) {