|
|
|
|
@ -51,7 +51,10 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
authProv = Provider.of<AuthProvider>(context);
|
|
|
|
|
|
|
|
|
|
final focusD1 = FocusNode();
|
|
|
|
|
final focusD2 = FocusNode();
|
|
|
|
|
final focusD3 = FocusNode();
|
|
|
|
|
final focusD4 = FocusNode();
|
|
|
|
|
return FutureBuilder(
|
|
|
|
|
future: Future.wait([_loggedUserFuture]),
|
|
|
|
|
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
|
|
|
|
@ -78,6 +81,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
Container(
|
|
|
|
|
width: SizeConfig.realScreenWidth * 0.20,
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
|
style: buildTextStyle(),
|
|
|
|
|
maxLength: 1,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
@ -89,10 +93,16 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
val;
|
|
|
|
|
},
|
|
|
|
|
validator: validateCodeDigit,
|
|
|
|
|
onFieldSubmitted: (_) {
|
|
|
|
|
FocusScope.of(context)
|
|
|
|
|
.requestFocus(focusD2);
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
width: SizeConfig.realScreenWidth * 0.20,
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
focusNode: focusD2,
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
|
maxLength: 1,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: buildTextStyle(),
|
|
|
|
|
@ -103,10 +113,17 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
verifyAccountFormValue['digit2'] =
|
|
|
|
|
val;
|
|
|
|
|
},
|
|
|
|
|
validator: validateCodeDigit)),
|
|
|
|
|
onFieldSubmitted: (_) {
|
|
|
|
|
FocusScope.of(context)
|
|
|
|
|
.requestFocus(focusD3);
|
|
|
|
|
},
|
|
|
|
|
validator: validateCodeDigit),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: SizeConfig.realScreenWidth * 0.20,
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
focusNode: focusD3,
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
|
maxLength: 1,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: buildTextStyle(),
|
|
|
|
|
@ -116,11 +133,15 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
onSaved: (val) {
|
|
|
|
|
verifyAccountFormValue['digit3'] =
|
|
|
|
|
val;
|
|
|
|
|
},onFieldSubmitted: (_) {
|
|
|
|
|
FocusScope.of(context)
|
|
|
|
|
.requestFocus(focusD4);
|
|
|
|
|
},
|
|
|
|
|
validator: validateCodeDigit)),
|
|
|
|
|
Container(
|
|
|
|
|
width: SizeConfig.realScreenWidth * 0.20,
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
focusNode: focusD4,
|
|
|
|
|
maxLength: 1,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: buildTextStyle(),
|
|
|
|
|
@ -294,7 +315,8 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
sharedPref.setString(TOKEN, res['AuthenticationTokenID']);
|
|
|
|
|
if (res['List_DoctorProfile'] != null) {
|
|
|
|
|
loginProcessCompleted(res['List_DoctorProfile'][0],changeLoadingStata);
|
|
|
|
|
loginProcessCompleted(
|
|
|
|
|
res['List_DoctorProfile'][0], changeLoadingStata);
|
|
|
|
|
} else {
|
|
|
|
|
_asyncSimpleDialog(context, res['List_DoctorsClinic'], 'ClinicName',
|
|
|
|
|
'Please Select Clinic')
|
|
|
|
|
@ -319,7 +341,6 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*@author: Elham Rababah
|
|
|
|
|
*@Date:17/5/2020
|
|
|
|
|
@ -327,7 +348,8 @@ class _VerifyAccountState extends State<VerifyAccount> {
|
|
|
|
|
*@return:
|
|
|
|
|
*@desc: loginProcessCompleted
|
|
|
|
|
*/
|
|
|
|
|
loginProcessCompleted(Map<String, dynamic> profile, Function changeLoadingStata) {
|
|
|
|
|
loginProcessCompleted(
|
|
|
|
|
Map<String, dynamic> profile, Function changeLoadingStata) {
|
|
|
|
|
changeLoadingStata(false);
|
|
|
|
|
sharedPref.setObj(DOCTOR_PROFILE, profile);
|
|
|
|
|
Navigator.of(context).pushNamed(HOME);
|
|
|
|
|
|