mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 10:17:47 +08:00
feat: hide dashbot fab when dashbot is open
This commit is contained in:
@@ -21,6 +21,8 @@ class Dashboard extends ConsumerWidget {
|
||||
ref.watch(settingsProvider.select((value) => value.isDashBotEnabled));
|
||||
final isDashBotActive = ref
|
||||
.watch(dashbotWindowNotifierProvider.select((value) => value.isActive));
|
||||
final isDashBotPopped = ref
|
||||
.watch(dashbotWindowNotifierProvider.select((value) => value.isPopped));
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: Row(
|
||||
@@ -129,7 +131,9 @@ class Dashboard extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: isDashBotEnabled && !isDashBotActive
|
||||
floatingActionButton: isDashBotEnabled &&
|
||||
!isDashBotActive &&
|
||||
isDashBotPopped
|
||||
? FloatingActionButton(
|
||||
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
|
||||
onPressed: () => showDashbotWindow(context, ref),
|
||||
|
||||
Reference in New Issue
Block a user