feat: hide dashbot fab when dashbot is open

This commit is contained in:
Udhay-Adithya
2025-09-24 22:27:21 +05:30
parent 35fad1338a
commit 5149179d66
4 changed files with 5 additions and 23 deletions

View File

@@ -144,10 +144,6 @@ class DashbotWindow extends ConsumerWidget {
.read(dashbotWindowNotifierProvider
.notifier)
.togglePopped();
ref
.read(dashbotWindowNotifierProvider
.notifier)
.toggleActive();
},
),
IconButton(

View File

@@ -87,10 +87,6 @@ class _DashbotTabState extends ConsumerState<DashbotTab>
.read(dashbotWindowNotifierProvider.notifier)
.togglePopped();
ref
.read(dashbotWindowNotifierProvider.notifier)
.toggleActive();
final newState =
ref.read(dashbotWindowNotifierProvider);
if (newState.isPopped) {

View File

@@ -23,20 +23,6 @@ class DashbotHomePage extends ConsumerStatefulWidget {
class _DashbotHomePageState extends ConsumerState<DashbotHomePage> {
@override
Widget build(BuildContext context) {
// final hasOkResponse = ref.watch(
// selectedRequestModelProvider.select((req) =>
// req?.httpResponseModel?.statusCode != null &&
// req?.httpResponseModel?.statusCode == 200),
// );
// ref.listen(
// selectedRequestModelProvider,
// (current, next) {
// if (current?.id != next?.id) {
// Navigator.pop(context);
// }
// },
// );
return Container(
padding: const EdgeInsets.all(16),
child: Column(

View File

@@ -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),