Login form made easier to use - instead of hiding the keyboard and then pressing the 'LOGIN' button a user can click 'done' on their keyboard in the password field and the login API function is called.
This commit is contained in:
parent
eaa254e0e0
commit
debf66ed17
10 changed files with 230 additions and 6 deletions
|
@ -157,6 +157,11 @@ class LoginPageState extends State<LoginPage> {
|
|||
color: Colors.grey[800],
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
onSubmitted: (_) {
|
||||
SystemChannels.textInput.invokeMethod('TextInput.hide');
|
||||
requestLoginAPI(context, _emailController.text,
|
||||
_passwordController.text);
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
@ -168,6 +173,10 @@ class LoginPageState extends State<LoginPage> {
|
|||
SystemChannels.textInput.invokeMethod('TextInput.hide');
|
||||
requestLoginAPI(context, _emailController.text,
|
||||
_passwordController.text);
|
||||
// showDialog(
|
||||
// barrierDismissible: false,
|
||||
// );
|
||||
// print("pressed");
|
||||
},
|
||||
child: Text("LOGIN",
|
||||
style:
|
||||
|
|
Reference in a new issue