From 2e5384728d3159ffc577b148857c7fbb676c049a Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Tue, 11 Nov 2025 23:55:37 +0100 Subject: [PATCH] Allow clearing the times for workout sessions --- lib/widgets/routines/forms/session.dart | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/widgets/routines/forms/session.dart b/lib/widgets/routines/forms/session.dart index 191f3615..231adc73 100644 --- a/lib/widgets/routines/forms/session.dart +++ b/lib/widgets/routines/forms/session.dart @@ -142,6 +142,15 @@ class _SessionFormState extends State { decoration: InputDecoration( labelText: AppLocalizations.of(context).timeStart, errorMaxLines: 2, + suffix: IconButton( + onPressed: () => { + setState(() { + timeStartController.text = ''; + widget._session.timeStart = null; + }), + }, + icon: const Icon(Icons.clear), + ), ), controller: timeStartController, onFieldSubmitted: (_) {}, @@ -187,6 +196,15 @@ class _SessionFormState extends State { key: const ValueKey('time-end'), decoration: InputDecoration( labelText: AppLocalizations.of(context).timeEnd, + suffix: IconButton( + onPressed: () => { + setState(() { + timeEndController.text = ''; + widget._session.timeEnd = null; + }), + }, + icon: const Icon(Icons.clear), + ), ), controller: timeEndController, onFieldSubmitted: (_) {},