From 93d4d7a85449d63d2a7b9ae67d41222b505e2028 Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Sun, 28 Dec 2025 02:24:30 +0100 Subject: [PATCH] =?UTF-8?q?Feat:=20Schlie=C3=9Ft=20den=20FloatingCreationB?= =?UTF-8?q?utton=20beim=20Anklicken=20einer=20Option=20wieder.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Pages/Misc/floating_creation_button.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Pages/Misc/floating_creation_button.dart b/lib/Pages/Misc/floating_creation_button.dart index 44d9802..714974f 100644 --- a/lib/Pages/Misc/floating_creation_button.dart +++ b/lib/Pages/Misc/floating_creation_button.dart @@ -15,9 +15,11 @@ class FloatingCreationButton extends StatefulWidget { class _FloatingCreationButtonState extends State { final AccountController _accountController = AccountController(); + final _key = GlobalKey(); @override Widget build(final BuildContext context) => ExpandableFab( + key: _key, openButtonBuilder: RotateFloatingActionButtonBuilder( child: const Icon(Icons.add), ), @@ -54,7 +56,14 @@ class _FloatingCreationButtonState extends State { const SizedBox(width: 12), FloatingActionButton.small( heroTag: null, - onPressed: onPressed, + onPressed: () { + onPressed.call(); + + final ExpandableFabState? state = _key.currentState; + if (state != null && state.isOpen) { + state.close(); + } + }, child: Icon(icon), ), ],