diff --git a/lib/screens/add_entry.dart b/lib/screens/add_entry.dart index 47e68a1..8a78dd3 100644 --- a/lib/screens/add_entry.dart +++ b/lib/screens/add_entry.dart @@ -132,6 +132,8 @@ class _AddEntryScreen extends State { FilteringTextInputFormatter.allow(RegExp(r'^(\d+)?[\.,]?\d{0,2}')), ], controller: gramsController, + onFieldSubmitted: (_) => _addEntry(), + autofocus: true, ), TextFormField( decoration: const InputDecoration( @@ -139,6 +141,7 @@ class _AddEntryScreen extends State { ), controller: productNameController, onChanged: (_) => _getProducts(), + onFieldSubmitted: (_) => _addEntry(), ), TextButton( onPressed: () {