Commit 8bd3cc8
committed
refactor: update navigation menus and form themes
This commit refactors the top navigation to use `DropdownMenu` and `MenuButton` for sub-items, enhancing the visual feedback for the active route. It also introduces a global theme for `MenuButton` and updates form component examples.
### Key Changes:
* **Top Navigation (`top_navigation.dart`):**
* Replaced the manual `Column` of `LightButton` widgets with a `DropdownMenu` containing `MenuButton` components.
* Added visual indicators for the current active route within the dropdown, including a `mapPin` icon and specific text coloring (using `Colors.gray[400]`).
* Enabled `enablePress` on the popover for better interactivity.
* **Theme Overrides (`form_themes.dart`):**
* Added a `MenuButtonTheme` to the global `ComponentTheme`.
* Defined custom decorations for `MenuButton` based on widget states, specifically handling `disabled` and `hovered` states using the theme's muted color scheme.
* **Form Components (`forms_screen.dart`):**
* Updated the `Popover` example to include `enablePress: true`.
* Added `autoClose: false` to a sub-menu button example.
* Applied code formatting to improve readability of code snippets within the UI.1 parent ff835c4 commit 8bd3cc8
3 files changed
Lines changed: 72 additions & 20 deletions
File tree
- lib/screens
- components/forms
- widgets
- layouts/widgets
- overrides
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
79 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
85 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| |||
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
| 133 | + | |
| 134 | + | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
| |||
168 | 176 | | |
169 | 177 | | |
170 | 178 | | |
171 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
172 | 182 | | |
173 | 183 | | |
174 | 184 | | |
| |||
236 | 246 | | |
237 | 247 | | |
238 | 248 | | |
| 249 | + | |
239 | 250 | | |
240 | 251 | | |
241 | 252 | | |
| |||
245 | 256 | | |
246 | 257 | | |
247 | 258 | | |
| 259 | + | |
248 | 260 | | |
249 | 261 | | |
250 | 262 | | |
| |||
267 | 279 | | |
268 | 280 | | |
269 | 281 | | |
| 282 | + | |
270 | 283 | | |
271 | 284 | | |
272 | 285 | | |
| |||
279 | 292 | | |
280 | 293 | | |
281 | 294 | | |
| 295 | + | |
282 | 296 | | |
283 | 297 | | |
284 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
96 | 118 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
101 | 122 | | |
102 | 123 | | |
103 | 124 | | |
104 | 125 | | |
105 | | - | |
| 126 | + | |
106 | 127 | | |
107 | 128 | | |
108 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
49 | 66 | | |
50 | 67 | | |
51 | 68 | | |
| |||
0 commit comments