|
@@ -363,10 +363,28 @@ class _WithdrawContainerState extends State<_WithdrawContainer> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Widget _createSubmit(WithdrawModel model) { |
|
|
Widget _createSubmit(WithdrawModel model) { |
|
|
|
|
|
|
|
|
String value = model.cashOutDashbordItems[_currentIndex].value; |
|
|
|
|
|
|
|
|
// String value = model.cashOutDashbordItems[_currentIndex].value; |
|
|
|
|
|
// try { |
|
|
|
|
|
// if (num.tryParse(value) != null && |
|
|
|
|
|
// null != _bloc.withdrawDataModel && |
|
|
|
|
|
// num.tryParse(value) < |
|
|
|
|
|
// num.tryParse(_bloc.withdrawDataModel.finValue)) { |
|
|
|
|
|
// _submitable = true; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// _submitable = false; |
|
|
|
|
|
// } |
|
|
|
|
|
// } catch (e, s) { |
|
|
|
|
|
// print(e); |
|
|
|
|
|
// print(s); |
|
|
|
|
|
// } |
|
|
try { |
|
|
try { |
|
|
if (num.tryParse(value) != null && null != _bloc.withdrawDataModel && num.tryParse(value) < num.tryParse(_bloc.withdrawDataModel.finValue)) { |
|
|
|
|
|
|
|
|
var currentWithdraw = num.tryParse(_controller.text); |
|
|
|
|
|
var finValue = num.tryParse(_bloc.withdrawDataModel.finValue); |
|
|
|
|
|
if (currentWithdraw != null && |
|
|
|
|
|
currentWithdraw != 0 && |
|
|
|
|
|
finValue != null && |
|
|
|
|
|
finValue != 0 && |
|
|
|
|
|
currentWithdraw <= finValue) { |
|
|
_submitable = true; |
|
|
_submitable = true; |
|
|
} else { |
|
|
} else { |
|
|
_submitable = false; |
|
|
_submitable = false; |
|
@@ -434,18 +452,24 @@ class _WithdrawContainerState extends State<_WithdrawContainer> { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///检查提现按钮是否可用 |
|
|
void _checkSubmit(String value) { |
|
|
void _checkSubmit(String value) { |
|
|
try { |
|
|
|
|
|
if (num.tryParse(value) != null && |
|
|
|
|
|
num.tryParse(value) < num.tryParse(_bloc.withdrawDataModel.finValue)) { |
|
|
|
|
|
_submitable = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
_submitable = false; |
|
|
|
|
|
} |
|
|
|
|
|
} catch (e, s) { |
|
|
|
|
|
print(e); |
|
|
|
|
|
print(s); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// try { |
|
|
|
|
|
// var currentValue = num.tryParse(value); |
|
|
|
|
|
// var finValue = num.tryParse(_bloc.withdrawDataModel.finValue); |
|
|
|
|
|
// |
|
|
|
|
|
// if (currentValue != null && |
|
|
|
|
|
// currentValue != 0 && |
|
|
|
|
|
// currentValue <= finValue && |
|
|
|
|
|
// finValue != 0) { |
|
|
|
|
|
// _submitable = true; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// _submitable = false; |
|
|
|
|
|
// } |
|
|
|
|
|
// } catch (e, s) { |
|
|
|
|
|
// print(e); |
|
|
|
|
|
// print(s); |
|
|
|
|
|
// } |
|
|
setState(() {}); |
|
|
setState(() {}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |