Allow clearing the times for workout sessions

This commit is contained in:
Roland Geider
2025-11-11 23:55:37 +01:00
parent 06cfa3a649
commit 2e5384728d

View File

@@ -142,6 +142,15 @@ class _SessionFormState extends State<SessionForm> {
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<SessionForm> {
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: (_) {},