Skip to content
Snippets Groups Projects
Commit fb8f10ad authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

keep order of actions across pages

parent b59339e0
No related branches found
No related tags found
No related merge requests found
......@@ -39,9 +39,9 @@ class _AdminDetailsPageState extends State<AdminDetailsPage> {
appBar: AppBar(
title: Text('Details zu ${_admin.firstName} ${_admin.lastName}'),
actions: [
IconButton(onPressed: _onDelete, icon: Icon(Icons.delete_rounded)),
if (EnvironmentConfig.desktop)
IconButton(onPressed: _onRefresh, icon: Icon(Icons.refresh_rounded)),
IconButton(onPressed: _onDelete, icon: Icon(Icons.delete_rounded)),
],
),
body: RefreshIndicator(
......@@ -148,7 +148,7 @@ class _AdminDetailsPageState extends State<AdminDetailsPage> {
final now = DateTime.now();
final result = await showDatePicker(
context: context,
initialDate: _formData.expires,
initialDate: (_formData.expires.isBefore(now)) ? now : _formData.expires,
firstDate: now,
lastDate: now.add(const Duration(days: 365 * 3)),
confirmText: 'Speichern',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment