field keyboard enter option implement
This commit is contained in:
parent
66148a91dc
commit
af55c3c73d
@ -1161,8 +1161,32 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
||||
.digitsOnly, // ✅ allows only 0–9
|
||||
],
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction:
|
||||
TextInputAction.done,
|
||||
showCursor: true,
|
||||
controller: _otpController,
|
||||
onCompleted: (value) {
|
||||
if (_isLoading ||
|
||||
_isOtpVerified) {
|
||||
return;
|
||||
}
|
||||
if (_formKey.currentState
|
||||
?.validate() ==
|
||||
true) {
|
||||
verifyOTP(value.trim());
|
||||
}
|
||||
},
|
||||
onSubmitted: (value) {
|
||||
if (_isLoading ||
|
||||
_isOtpVerified) {
|
||||
return;
|
||||
}
|
||||
if (_formKey.currentState
|
||||
?.validate() ==
|
||||
true) {
|
||||
verifyOTP(value.trim());
|
||||
}
|
||||
},
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'OTP is required';
|
||||
|
||||
@ -1729,6 +1729,13 @@ class _loginState extends State<login> {
|
||||
emailMobileController,
|
||||
keyboardType:
|
||||
TextInputType.text,
|
||||
textInputAction:
|
||||
TextInputAction.done,
|
||||
onFieldSubmitted: (_) {
|
||||
if (!_isLoading) {
|
||||
verifyMobileAndEmailNumber();
|
||||
}
|
||||
},
|
||||
decoration:
|
||||
const InputDecoration(
|
||||
border: InputBorder.none,
|
||||
@ -1978,6 +1985,8 @@ class _loginState extends State<login> {
|
||||
keyboardType:
|
||||
TextInputType
|
||||
.emailAddress,
|
||||
textInputAction:
|
||||
TextInputAction.next,
|
||||
decoration:
|
||||
InputDecoration(
|
||||
border:
|
||||
@ -2026,6 +2035,13 @@ class _loginState extends State<login> {
|
||||
passwordController,
|
||||
obscureText:
|
||||
_obscurePassword,
|
||||
textInputAction:
|
||||
TextInputAction.done,
|
||||
onFieldSubmitted: (_) {
|
||||
if (!_isLoading) {
|
||||
loginWithUsernameAndPw();
|
||||
}
|
||||
},
|
||||
textAlignVertical:
|
||||
TextAlignVertical
|
||||
.center, // ✅ THE FIX
|
||||
@ -2175,6 +2191,15 @@ class _loginState extends State<login> {
|
||||
keyboardType:
|
||||
TextInputType
|
||||
.emailAddress,
|
||||
textInputAction:
|
||||
TextInputAction.done,
|
||||
onFieldSubmitted: (_) {
|
||||
if (_isLoading ||
|
||||
otpFieldShow) {
|
||||
return;
|
||||
}
|
||||
mailVerify();
|
||||
},
|
||||
decoration:
|
||||
InputDecoration(
|
||||
border:
|
||||
@ -2261,9 +2286,24 @@ class _loginState extends State<login> {
|
||||
keyboardType:
|
||||
TextInputType
|
||||
.number,
|
||||
textInputAction:
|
||||
TextInputAction
|
||||
.done,
|
||||
showCursor: true,
|
||||
controller:
|
||||
_otpController,
|
||||
onCompleted:
|
||||
(_) {
|
||||
if (!_isLoading) {
|
||||
otpVerify();
|
||||
}
|
||||
},
|
||||
onSubmitted:
|
||||
(_) {
|
||||
if (!_isLoading) {
|
||||
otpVerify();
|
||||
}
|
||||
},
|
||||
validator:
|
||||
(value) {
|
||||
if (value ==
|
||||
@ -2410,6 +2450,8 @@ class _loginState extends State<login> {
|
||||
obscureText:
|
||||
_resetObscurePassword,
|
||||
onChanged: validatePassword,
|
||||
textInputAction:
|
||||
TextInputAction.next,
|
||||
textAlignVertical:
|
||||
TextAlignVertical
|
||||
.center,
|
||||
@ -2510,6 +2552,15 @@ class _loginState extends State<login> {
|
||||
confirmPasswordController,
|
||||
obscureText:
|
||||
_obscureConfirmPassword,
|
||||
textInputAction:
|
||||
TextInputAction.done,
|
||||
onFieldSubmitted: (_) {
|
||||
if (_isLoading ||
|
||||
!isPasswordValid) {
|
||||
return;
|
||||
}
|
||||
resetYourPassword();
|
||||
},
|
||||
textAlignVertical:
|
||||
TextAlignVertical
|
||||
.center,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user