mirror of
https://github.com/foss42/apidash.git
synced 2025-11-30 17:59:18 +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 saveDataStateProvider = StateProvider<bool>((ref) => false);
|
||||||
final clearDataStateProvider = StateProvider<bool>((ref) => false);
|
final clearDataStateProvider = StateProvider<bool>((ref) => false);
|
||||||
final hasUnsavedChangesProvider = StateProvider<bool>((ref) => false);
|
final hasUnsavedChangesProvider = StateProvider<bool>((ref) => false);
|
||||||
|
final showTerminalBadgeProvider = StateProvider<bool>((ref) => false);
|
||||||
|
|
||||||
// final nameTextFieldControllerProvider =
|
// final nameTextFieldControllerProvider =
|
||||||
// StateProvider.autoDispose<TextEditingController>((ref) {
|
// StateProvider.autoDispose<TextEditingController>((ref) {
|
||||||
|
|||||||
@@ -76,14 +76,22 @@ class Dashboard extends ConsumerWidget {
|
|||||||
style: Theme.of(context).textTheme.labelSmall,
|
style: Theme.of(context).textTheme.labelSmall,
|
||||||
),
|
),
|
||||||
kVSpacer10,
|
kVSpacer10,
|
||||||
IconButton(
|
Badge(
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.error,
|
||||||
|
isLabelVisible:
|
||||||
|
ref.watch(showTerminalBadgeProvider) && railIdx != 3,
|
||||||
|
child: IconButton(
|
||||||
isSelected: railIdx == 3,
|
isSelected: railIdx == 3,
|
||||||
onPressed: () {
|
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),
|
icon: const Icon(Icons.terminal_outlined),
|
||||||
selectedIcon: const Icon(Icons.terminal),
|
selectedIcon: const Icon(Icons.terminal),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
'Logs',
|
'Logs',
|
||||||
style: Theme.of(context).textTheme.labelSmall,
|
style: Theme.of(context).textTheme.labelSmall,
|
||||||
|
|||||||
Reference in New Issue
Block a user