From b8c49132d7e7fe926cf9a518246c3f1e0230fad4 Mon Sep 17 00:00:00 2001 From: andrei Date: Thu, 4 Nov 2021 21:27:55 -0400 Subject: [PATCH] add form text input aciton --- lib/add_form.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/add_form.dart b/lib/add_form.dart index 4c7c847..b70013d 100644 --- a/lib/add_form.dart +++ b/lib/add_form.dart @@ -76,15 +76,14 @@ class _AddFormState extends State { } return null; }, - onFieldSubmitted: (value) { - if (_formKey.currentState!.validate()) { - FocusScope.of(context).requestFocus(_TemplateFocusNode); - } - }, + textInputAction: TextInputAction.next, + onFieldSubmitted: (value) => + _formKey.currentState!.validate(), decoration: const InputDecoration(labelText: 'Label')), TextFormField( decoration: const InputDecoration(labelText: 'Description(optional)'), + textInputAction: TextInputAction.next, onChanged: (value) { _listDesc = value; },