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