@@ -189,11 +189,14 @@ class _ProxiesListViewState extends State<ProxiesListView> {
189189 Positioned .fill (
190190 child: ScrollConfiguration (
191191 behavior: HiddenBarScrollBehavior (),
192- child: ListView .builder (
193- padding: const EdgeInsets .all (16 ),
194- controller: _controller,
195- itemCount: items.length,
196- itemBuilder: (_, index) => items[index],
192+ child: FocusTraversalGroup (
193+ policy: WidgetOrderTraversalPolicy (),
194+ child: ListView .builder (
195+ padding: const EdgeInsets .all (16 ),
196+ controller: _controller,
197+ itemCount: items.length,
198+ itemBuilder: (_, index) => items[index],
199+ ),
197200 ),
198201 ),
199202 ),
@@ -318,104 +321,101 @@ class _ProxyGroupCardState extends State<ProxyGroupCard>
318321 });
319322
320323 return RepaintBoundary (
321- child: Expansible (
322- controller: _expansibleController,
323- headerBuilder: (context, animation) => GestureDetector (
324- onTap: () => _toggleExpansion (unfoldSet),
325- child: Container (
326- decoration: BoxDecoration (
327- color: colorScheme.surfaceContainerLow.opacity80,
328- borderRadius: BorderRadius .circular (16.0 ),
329- ),
330- margin: const EdgeInsets .symmetric (vertical: 4.0 ),
331- padding: const EdgeInsets .symmetric (
332- vertical: 10.0 , horizontal: 16.0 ),
333- child: Row (
324+ child: FocusTraversalGroup (
325+ policy: OrderedTraversalPolicy (),
326+ child: Expansible (
327+ controller: _expansibleController,
328+ headerBuilder: (context, animation) => GestureDetector (
329+ onTap: () => _toggleExpansion (unfoldSet),
330+ child: Container (
331+ decoration: BoxDecoration (
332+ color: colorScheme.surfaceContainerLow.opacity80,
333+ borderRadius: BorderRadius .circular (16.0 ),
334+ ),
335+ margin: const EdgeInsets .symmetric (vertical: 4.0 ),
336+ padding: const EdgeInsets .symmetric (
337+ vertical: 10.0 ,
338+ horizontal: 16.0 ,
339+ ),
340+ child: Row (
334341 mainAxisAlignment: MainAxisAlignment .spaceBetween,
335342 children: [
336343 Flexible (
337- child: Row (children: [
338- _buildIcon (),
339- Flexible (
340- child: Column (
341- mainAxisSize: MainAxisSize .min,
342- crossAxisAlignment: CrossAxisAlignment .start,
343- children: [
344- Text (
345- groupName,
346- style: context.textTheme.titleMedium,
347- ),
348- const SizedBox (
349- height: 4 ,
350- ),
351- Flexible (
352- flex: 1 ,
353- child: Consumer (
354- builder: (_, ref, __) {
355- final proxyName = ref
356- .watch (
357- getSelectedProxyNameProvider (
358- groupName,
359- ))
360- .getSafeValue ("" );
361- if (proxyName.isEmpty) {
362- return const SizedBox .shrink ();
363- }
364- return EmojiText (
365- overflow: TextOverflow .ellipsis,
366- proxyName,
367- style: context.textTheme
368- .labelMedium? .toLight,
369- );
370- },
371- ),
344+ child: Row (
345+ children: [
346+ _buildIcon (),
347+ Flexible (
348+ child: Column (
349+ mainAxisSize: MainAxisSize .min,
350+ crossAxisAlignment: CrossAxisAlignment .start,
351+ children: [
352+ Text (
353+ groupName,
354+ style: context.textTheme.titleMedium,
355+ ),
356+ const SizedBox (height: 4 ),
357+ Flexible (
358+ flex: 1 ,
359+ child: Consumer (
360+ builder: (_, ref, __) {
361+ final proxyName = ref
362+ .watch (getSelectedProxyNameProvider (groupName))
363+ .getSafeValue ("" );
364+ if (proxyName.isEmpty) {
365+ return const SizedBox .shrink ();
366+ }
367+ return EmojiText (
368+ overflow: TextOverflow .ellipsis,
369+ proxyName,
370+ style: context.textTheme.labelMedium? .toLight,
371+ );
372+ },
373+ ),
374+ ),
375+ const SizedBox (width: 4 ),
376+ ],
372377 ),
373- const SizedBox (
374- width: 4 ,
375- ),
376- ],
377- ),
378+ ),
379+ ],
378380 ),
379- ]) ),
381+ ),
380382 Row (
381383 children: [
382384 if (isExpand) ...[
383385 IconButton (
384386 onPressed: _delayTest,
385387 visualDensity: VisualDensity .standard,
386- icon: const Icon (
387- Icons .network_ping,
388- ),
389- ),
390- const SizedBox (
391- width: 6 ,
388+ icon: const Icon (Icons .network_ping),
392389 ),
390+ const SizedBox (width: 6 ),
393391 ] else
394- const SizedBox (
395- width: 4 ,
396- ),
392+ const SizedBox (width: 4 ),
397393 IconButton .filledTonal (
398394 onPressed: () => _toggleExpansion (unfoldSet),
399- icon: CommonExpandIcon (
400- expand: isExpand,
401- ),
402- )
395+ icon: CommonExpandIcon (expand: isExpand),
396+ ),
403397 ],
404- )
405- ]))),
406- bodyBuilder: (context, animation) => RepaintBoundary (
407- child: SizeTransition (
408- sizeFactor: animation,
409- axisAlignment: - 1.0 ,
410- child: FadeTransition (
411- opacity: animation,
412- child: Container (
413- margin: const EdgeInsets .symmetric (vertical: 4.0 ),
414- child: Column (children: widget.proxies))),
415- ),
416- ),
417- expansibleBuilder: (context, header, body, animation) =>
418- Column (children: [header, body]),
398+ ),
399+ ],
400+ ),
401+ ),
402+ ),
403+ bodyBuilder: (context, animation) => RepaintBoundary (
404+ child: SizeTransition (
405+ sizeFactor: animation,
406+ axisAlignment: - 1.0 ,
407+ child: FadeTransition (
408+ opacity: animation,
409+ child: Container (
410+ margin: const EdgeInsets .symmetric (vertical: 4.0 ),
411+ child: Column (children: widget.proxies),
412+ ),
413+ ),
414+ ),
415+ ),
416+ expansibleBuilder: (context, header, body, animation) =>
417+ Column (children: [header, body]),
418+ ),
419419 ),
420420 );
421421 },
0 commit comments