From 484321556910b1ecae46d0c96f833050355347cc Mon Sep 17 00:00:00 2001 From: Cyanose Date: Thu, 3 Aug 2023 12:19:02 +0200 Subject: [PATCH] add Entry on grams field submitted add Entry on product field submitted as well --- lib/screens/add_entry.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/screens/add_entry.dart b/lib/screens/add_entry.dart index 47e68a1..dfff97e 100644 --- a/lib/screens/add_entry.dart +++ b/lib/screens/add_entry.dart @@ -132,6 +132,7 @@ class _AddEntryScreen extends State { FilteringTextInputFormatter.allow(RegExp(r'^(\d+)?[\.,]?\d{0,2}')), ], controller: gramsController, + onFieldSubmitted: (_) => _addEntry(), ), TextFormField( decoration: const InputDecoration( @@ -139,6 +140,7 @@ class _AddEntryScreen extends State { ), controller: productNameController, onChanged: (_) => _getProducts(), + onFieldSubmitted: (_) => _addEntry(), ), TextButton( onPressed: () {