From 16b2b7c10d17cdde2f672b46fd7967791a4f8d5a Mon Sep 17 00:00:00 2001 From: Khushbu Bora <72873874+KhushbuBora@users.noreply.github.com> Date: Wed, 11 Aug 2021 15:42:19 +0530 Subject: [PATCH] Update gym_mode.dart --- lib/widgets/workouts/gym_mode.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/widgets/workouts/gym_mode.dart b/lib/widgets/workouts/gym_mode.dart index 0d19bd03..660f3134 100644 --- a/lib/widgets/workouts/gym_mode.dart +++ b/lib/widgets/workouts/gym_mode.dart @@ -259,12 +259,14 @@ class _LogPageState extends State { final _weightController = TextEditingController(); var _detailed = false; - FocusNode focusNode = new FocusNode(); + late FocusNode focusNode; @override void initState() { super.initState(); + focusNode = FocusNode(); + if (widget._setting.reps != null) { _repsController.text = widget._setting.reps.toString(); } @@ -274,6 +276,12 @@ class _LogPageState extends State { } } + @override + void dispose() { + focusNode.dispose(); + super.dispose(); + } + Widget getRepsWidget() { return Row( children: [