field keyboard enter option implement

This commit is contained in:
Surendiran 2026-08-11 11:15:35 +05:30
parent 66148a91dc
commit af55c3c73d
2 changed files with 75 additions and 0 deletions

View File

@ -1161,8 +1161,32 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
.digitsOnly, // allows only 09 .digitsOnly, // allows only 09
], ],
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
textInputAction:
TextInputAction.done,
showCursor: true, showCursor: true,
controller: _otpController, 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) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return 'OTP is required'; return 'OTP is required';

View File

@ -1729,6 +1729,13 @@ class _loginState extends State<login> {
emailMobileController, emailMobileController,
keyboardType: keyboardType:
TextInputType.text, TextInputType.text,
textInputAction:
TextInputAction.done,
onFieldSubmitted: (_) {
if (!_isLoading) {
verifyMobileAndEmailNumber();
}
},
decoration: decoration:
const InputDecoration( const InputDecoration(
border: InputBorder.none, border: InputBorder.none,
@ -1978,6 +1985,8 @@ class _loginState extends State<login> {
keyboardType: keyboardType:
TextInputType TextInputType
.emailAddress, .emailAddress,
textInputAction:
TextInputAction.next,
decoration: decoration:
InputDecoration( InputDecoration(
border: border:
@ -2026,6 +2035,13 @@ class _loginState extends State<login> {
passwordController, passwordController,
obscureText: obscureText:
_obscurePassword, _obscurePassword,
textInputAction:
TextInputAction.done,
onFieldSubmitted: (_) {
if (!_isLoading) {
loginWithUsernameAndPw();
}
},
textAlignVertical: textAlignVertical:
TextAlignVertical TextAlignVertical
.center, // THE FIX .center, // THE FIX
@ -2175,6 +2191,15 @@ class _loginState extends State<login> {
keyboardType: keyboardType:
TextInputType TextInputType
.emailAddress, .emailAddress,
textInputAction:
TextInputAction.done,
onFieldSubmitted: (_) {
if (_isLoading ||
otpFieldShow) {
return;
}
mailVerify();
},
decoration: decoration:
InputDecoration( InputDecoration(
border: border:
@ -2261,9 +2286,24 @@ class _loginState extends State<login> {
keyboardType: keyboardType:
TextInputType TextInputType
.number, .number,
textInputAction:
TextInputAction
.done,
showCursor: true, showCursor: true,
controller: controller:
_otpController, _otpController,
onCompleted:
(_) {
if (!_isLoading) {
otpVerify();
}
},
onSubmitted:
(_) {
if (!_isLoading) {
otpVerify();
}
},
validator: validator:
(value) { (value) {
if (value == if (value ==
@ -2410,6 +2450,8 @@ class _loginState extends State<login> {
obscureText: obscureText:
_resetObscurePassword, _resetObscurePassword,
onChanged: validatePassword, onChanged: validatePassword,
textInputAction:
TextInputAction.next,
textAlignVertical: textAlignVertical:
TextAlignVertical TextAlignVertical
.center, .center,
@ -2510,6 +2552,15 @@ class _loginState extends State<login> {
confirmPasswordController, confirmPasswordController,
obscureText: obscureText:
_obscureConfirmPassword, _obscureConfirmPassword,
textInputAction:
TextInputAction.done,
onFieldSubmitted: (_) {
if (_isLoading ||
!isPasswordValid) {
return;
}
resetYourPassword();
},
textAlignVertical: textAlignVertical:
TextAlignVertical TextAlignVertical
.center, .center,