feat: integrate dashbot tab for desktop devices

This commit is contained in:
Udhay-Adithya
2025-09-05 03:02:00 +05:30
parent eaa830ef21
commit 9a6215246e
6 changed files with 94 additions and 12 deletions

View File

@@ -25,6 +25,16 @@ class DashbotWindow extends ConsumerWidget {
final settings = ref.watch(settingsProvider);
final currentRequest = ref.watch(selectedRequestModelProvider);
// Close the overlay when the window is not popped anymore
ref.listen(
dashbotWindowNotifierProvider.select((s) => s.isPopped),
(prev, next) {
if (prev == true && next == false) {
onClose();
}
},
);
ref.listen(
selectedRequestModelProvider,
(current, next) {
@@ -108,6 +118,20 @@ class DashbotWindow extends ConsumerWidget {
),
],
),
Spacer(),
IconButton(
icon: Icon(
Icons.open_in_new,
color:
Theme.of(context).colorScheme.onPrimary,
),
onPressed: () {
ref
.read(dashbotWindowNotifierProvider
.notifier)
.togglePopped();
},
),
IconButton(
icon: Icon(
Icons.close,