mirror of
https://github.com/foss42/apidash.git
synced 2025-11-30 09:48:58 +08:00
showTerminalBadgeProvider
This commit is contained in:
@@ -13,6 +13,7 @@ final historyCodePaneVisibleStateProvider = StateProvider<bool>((ref) => false);
|
||||
final saveDataStateProvider = StateProvider<bool>((ref) => false);
|
||||
final clearDataStateProvider = StateProvider<bool>((ref) => false);
|
||||
final hasUnsavedChangesProvider = StateProvider<bool>((ref) => false);
|
||||
final showTerminalBadgeProvider = StateProvider<bool>((ref) => false);
|
||||
|
||||
// final nameTextFieldControllerProvider =
|
||||
// StateProvider.autoDispose<TextEditingController>((ref) {
|
||||
|
||||
@@ -76,14 +76,22 @@ class Dashboard extends ConsumerWidget {
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
),
|
||||
kVSpacer10,
|
||||
IconButton(
|
||||
Badge(
|
||||
backgroundColor: Theme.of(context).colorScheme.error,
|
||||
isLabelVisible:
|
||||
ref.watch(showTerminalBadgeProvider) && railIdx != 3,
|
||||
child: IconButton(
|
||||
isSelected: railIdx == 3,
|
||||
onPressed: () {
|
||||
ref.read(navRailIndexStateProvider.notifier).state = 3;
|
||||
ref.read(navRailIndexStateProvider.notifier).state =
|
||||
3;
|
||||
ref.read(showTerminalBadgeProvider.notifier).state =
|
||||
false;
|
||||
},
|
||||
icon: const Icon(Icons.terminal_outlined),
|
||||
selectedIcon: const Icon(Icons.terminal),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Logs',
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
|
||||
Reference in New Issue
Block a user