mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-19 07:50:52 +01:00
Allow clearing the times for workout sessions
This commit is contained in:
@@ -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: (_) {},
|
||||
|
||||
Reference in New Issue
Block a user