@@ -17,100 +17,87 @@ class Dashboard extends ConsumerWidget {
17
17
@override
18
18
Widget build (BuildContext context, WidgetRef ref) {
19
19
final railIdx = ref.watch (navRailIndexStateProvider);
20
- return Shortcuts (
21
- shortcuts: {
22
- LogicalKeySet (LogicalKeyboardKey .control, LogicalKeyboardKey .keyS): const SaveIntent (),
23
- },
24
- child: Actions (
25
- actions: {
26
- SaveIntent : CallbackAction (onInvoke: (intent) => saveData (context, ref))
27
- },
28
- child: FocusScope (
29
- autofocus: true ,
30
- child: Scaffold (
31
- body: SafeArea (
32
- child: Row (
33
- children: < Widget > [
34
- Column (
20
+ return Scaffold (
21
+ body: SafeArea (
22
+ child: Row (
23
+ children: < Widget > [
24
+ Column (
25
+ children: [
26
+ SizedBox (
27
+ height: kIsMacOS ? 32.0 : 16.0 ,
28
+ width: 64 ,
29
+ ),
30
+ Column (
31
+ mainAxisSize: MainAxisSize .min,
32
+ children: [
33
+ IconButton (
34
+ isSelected: railIdx == 0 ,
35
+ onPressed: () {
36
+ ref.read (navRailIndexStateProvider.notifier).state = 0 ;
37
+ },
38
+ icon: const Icon (Icons .auto_awesome_mosaic_outlined),
39
+ selectedIcon: const Icon (Icons .auto_awesome_mosaic),
40
+ ),
41
+ Text (
42
+ 'Requests' ,
43
+ style: Theme .of (context).textTheme.labelSmall,
44
+ ),
45
+ kVSpacer10,
46
+ IconButton (
47
+ isSelected: railIdx == 1 ,
48
+ onPressed: () {
49
+ ref.read (navRailIndexStateProvider.notifier).state = 1 ;
50
+ },
51
+ icon: const Icon (Icons .laptop_windows_outlined),
52
+ selectedIcon: const Icon (Icons .laptop_windows),
53
+ ),
54
+ Text (
55
+ 'Variables' ,
56
+ style: Theme .of (context).textTheme.labelSmall,
57
+ ),
58
+ kVSpacer10,
59
+ IconButton (
60
+ isSelected: railIdx == 2 ,
61
+ onPressed: () {
62
+ ref.read (navRailIndexStateProvider.notifier).state = 2 ;
63
+ },
64
+ icon: const Icon (Icons .history_outlined),
65
+ selectedIcon: const Icon (Icons .history_rounded),
66
+ ),
67
+ Text (
68
+ 'History' ,
69
+ style: Theme .of (context).textTheme.labelSmall,
70
+ ),
71
+ ],
72
+ ),
73
+ Expanded (
74
+ child: Column (
75
+ mainAxisAlignment: MainAxisAlignment .end,
35
76
children: [
36
- SizedBox (
37
- height: kIsMacOS ? 32.0 : 16.0 ,
38
- width: 64 ,
39
- ),
40
- Column (
41
- mainAxisSize: MainAxisSize .min,
42
- children: [
43
- IconButton (
44
- isSelected: railIdx == 0 ,
45
- onPressed: () {
46
- ref.read (navRailIndexStateProvider.notifier).state = 0 ;
47
- },
48
- icon: const Icon (Icons .auto_awesome_mosaic_outlined),
49
- selectedIcon: const Icon (Icons .auto_awesome_mosaic),
50
- ),
51
- Text (
52
- 'Requests' ,
53
- style: Theme .of (context).textTheme.labelSmall,
54
- ),
55
- kVSpacer10,
56
- IconButton (
57
- isSelected: railIdx == 1 ,
58
- onPressed: () {
59
- ref.read (navRailIndexStateProvider.notifier).state = 1 ;
60
- },
61
- icon: const Icon (Icons .laptop_windows_outlined),
62
- selectedIcon: const Icon (Icons .laptop_windows),
63
- ),
64
- Text (
65
- 'Variables' ,
66
- style: Theme .of (context).textTheme.labelSmall,
67
- ),
68
- kVSpacer10,
69
- IconButton (
70
- isSelected: railIdx == 2 ,
71
- onPressed: () {
72
- ref.read (navRailIndexStateProvider.notifier).state = 2 ;
73
- },
74
- icon: const Icon (Icons .history_outlined),
75
- selectedIcon: const Icon (Icons .history_rounded),
76
- ),
77
- Text (
78
- 'History' ,
79
- style: Theme .of (context).textTheme.labelSmall,
80
- ),
81
- ],
77
+ Padding (
78
+ padding: const EdgeInsets .only (bottom: 16.0 ),
79
+ child: NavbarButton (
80
+ railIdx: railIdx,
81
+ selectedIcon: Icons .help,
82
+ icon: Icons .help_outline,
83
+ label: 'About' ,
84
+ showLabel: false ,
85
+ isCompact: true ,
86
+ onTap: () {
87
+ showAboutAppDialog (context);
88
+ },
89
+ ),
82
90
),
83
- Expanded (
84
- child: Column (
85
- mainAxisAlignment: MainAxisAlignment .end,
86
- children: [
87
- Padding (
88
- padding: const EdgeInsets .only (bottom: 16.0 ),
89
- child: NavbarButton (
90
- railIdx: railIdx,
91
- selectedIcon: Icons .help,
92
- icon: Icons .help_outline,
93
- label: 'About' ,
94
- showLabel: false ,
95
- isCompact: true ,
96
- onTap: () {
97
- showAboutAppDialog (context);
98
- },
99
- ),
100
- ),
101
- Padding (
102
- padding: const EdgeInsets .only (bottom: 16.0 ),
103
- child: NavbarButton (
104
- railIdx: railIdx,
105
- buttonIdx: 3 ,
106
- selectedIcon: Icons .settings,
107
- icon: Icons .settings_outlined,
108
- label: 'Settings' ,
109
- showLabel: false ,
110
- isCompact: true ,
111
- ),
112
- ),
113
- ],
91
+ Padding (
92
+ padding: const EdgeInsets .only (bottom: 16.0 ),
93
+ child: NavbarButton (
94
+ railIdx: railIdx,
95
+ buttonIdx: 3 ,
96
+ selectedIcon: Icons .settings,
97
+ icon: Icons .settings_outlined,
98
+ label: 'Settings' ,
99
+ showLabel: false ,
100
+ isCompact: true ,
114
101
),
115
102
),
116
103
],
@@ -134,8 +121,8 @@ class Dashboard extends ConsumerWidget {
134
121
SettingsPage (),
135
122
],
136
123
),
137
- ),
138
- ) ,
124
+ )
125
+ ] ,
139
126
),
140
127
),
141
128
// TODO: Release DashBot
0 commit comments