merge-requests/104/head
Mohammad ALjammal 6 years ago
commit 3495e6bc9b

@ -23,6 +23,7 @@ Helpers helpers = Helpers();
class LoginForm extends StatefulWidget with DrAppToastMsg {
LoginForm({this.changeLoadingStata});
final Function changeLoadingStata;
@override
@ -85,7 +86,7 @@ class _LoginFormState extends State<LoginForm> {
return null;
},
onSaved: (value) {
userInfo.UserID = value;
userInfo.UserID = value.trim();
},
onFieldSubmitted: (_) {
FocusScope.of(context).requestFocus(focusPass);
@ -337,6 +338,7 @@ class _LoginFormState extends State<LoginForm> {
userInfo.ProjectID = projectsList[index]["ID"];
projectIdController.text = projectsList[index]['Name'];
});
FocusScope.of(context).requestFocus(focusProject);
primaryFocus.unfocus();
}
}

@ -21,7 +21,9 @@ Helpers helpers = Helpers();
class VerifyAccount extends StatefulWidget {
VerifyAccount({this.changeLoadingStata});
final Function changeLoadingStata;
@override
_VerifyAccountState createState() => _VerifyAccountState();
}
@ -37,8 +39,9 @@ class _VerifyAccountState extends State<VerifyAccount> {
Future _loggedUserFuture;
var _loggedUser;
AuthProvider authProv;
bool _isInit =true;
bool _isInit = true;
var model;
@override
void initState() {
super.initState();
@ -93,25 +96,30 @@ class _VerifyAccountState extends State<VerifyAccount> {
MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
width: SizeConfig.realScreenWidth * 0.20,
child: TextFormField(
textInputAction: TextInputAction.next,
style: buildTextStyle(),
maxLength: 1,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
decoration:
buildInputDecoration(context),
onSaved: (val) {
verifyAccountFormValue['digit1'] =
val;
},
validator: validateCodeDigit,
onFieldSubmitted: (_) {
width: SizeConfig.realScreenWidth * 0.20,
child: TextFormField(
textInputAction: TextInputAction.next,
style: buildTextStyle(),
maxLength: 1,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
decoration: buildInputDecoration(context),
onSaved: (val) {
verifyAccountFormValue['digit1'] = val;
},
validator: validateCodeDigit,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(focusD2);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(focusD2);
},
)),
}
},
),
),
Container(
width: SizeConfig.realScreenWidth * 0.20,
child: TextFormField(
@ -131,6 +139,12 @@ class _VerifyAccountState extends State<VerifyAccount> {
FocusScope.of(context)
.requestFocus(focusD3);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(focusD3);
}
},
validator: validateCodeDigit),
),
Container(
@ -152,6 +166,12 @@ class _VerifyAccountState extends State<VerifyAccount> {
FocusScope.of(context)
.requestFocus(focusD4);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(focusD4);
}
},
validator: validateCodeDigit)),
Container(
width: SizeConfig.realScreenWidth * 0.20,

Loading…
Cancel
Save