@@ -179,24 +179,83 @@ class _JsonPreviewerState extends State<JsonPreviewer> {
179
179
Row (
180
180
mainAxisAlignment: MainAxisAlignment .end,
181
181
children: [
182
+ Expanded (
183
+ child: Container (
184
+ decoration: BoxDecoration (
185
+ color: Theme .of (context).colorScheme.surface,
186
+ border: Border .all (
187
+ color: Theme .of (context)
188
+ .colorScheme
189
+ .surfaceContainerHighest),
190
+ borderRadius: kBorderRadius8,
191
+ ),
192
+ child: Row (
193
+ children: [
194
+ const Padding (
195
+ padding: kPh4,
196
+ child: Icon (
197
+ Icons .search,
198
+ size: 16 ,
199
+ ),
200
+ ),
201
+ Expanded (
202
+ child: JsonSearchField (
203
+ controller: searchController,
204
+ onChanged: (term) => state.search (term),
205
+ ),
206
+ ),
207
+ const SizedBox (
208
+ width: 8 ,
209
+ ),
210
+ if (state.searchResults.isNotEmpty)
211
+ Text (_searchFocusText (),
212
+ style:
213
+ Theme .of (context).textTheme.bodySmall),
214
+ if (state.searchResults.isNotEmpty)
215
+ IconButton (
216
+ visualDensity: VisualDensity .compact,
217
+ onPressed: () {
218
+ store.focusPreviousSearchResult ();
219
+ _scrollToSearchMatch ();
220
+ },
221
+ icon: const Icon (Icons .arrow_drop_up),
222
+ ),
223
+ if (state.searchResults.isNotEmpty)
224
+ IconButton (
225
+ visualDensity: VisualDensity .compact,
226
+ onPressed: () {
227
+ store.focusNextSearchResult ();
228
+ _scrollToSearchMatch ();
229
+ },
230
+ icon: const Icon (Icons .arrow_drop_down),
231
+ ),
232
+ ],
233
+ ),
234
+ ),
235
+ ),
182
236
ADTextButton (
183
237
icon: Icons .unfold_more,
184
- showLabel: constraints.minWidth > kMinWindowSize.width,
238
+ showLabel:
239
+ (constraints.minWidth > kMinWindowSize.width) &&
240
+ ! kIsMobile,
185
241
label: 'Expand All' ,
186
242
labelTextStyle: kTextStyleButtonSmall,
187
243
onPressed:
188
244
state.areAllExpanded () ? null : state.expandAll,
189
245
),
190
246
ADTextButton (
191
247
icon: Icons .unfold_less,
192
- showLabel: constraints.minWidth > kMinWindowSize.width,
248
+ showLabel:
249
+ (constraints.minWidth > kMinWindowSize.width) &&
250
+ ! kIsMobile,
193
251
label: 'Collapse All' ,
194
252
labelTextStyle: kTextStyleButtonSmall,
195
253
onPressed:
196
254
state.areAllCollapsed () ? null : state.collapseAll,
197
255
),
198
256
],
199
257
),
258
+ kVSpacer6,
200
259
Expanded (
201
260
child: JsonExplorer (
202
261
nodes: state.displayNodes,
0 commit comments