mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: Only focus in dpad mode
This commit is contained in:
parent
0739247836
commit
39547163c3
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:collection/collection.dart';
|
||||
|
||||
import 'package:fladder/util/adaptive_layout/adaptive_layout.dart';
|
||||
|
||||
abstract class ItemAction {
|
||||
Widget toMenuItemButton();
|
||||
PopupMenuEntry toPopupMenuItem({bool useIcons = false});
|
||||
|
|
@ -100,7 +102,7 @@ class ItemActionButton extends ItemAction {
|
|||
final foregroundColor =
|
||||
selected ? Theme.of(context).colorScheme.onPrimaryContainer : Theme.of(context).colorScheme.onSurface;
|
||||
return ElevatedButton(
|
||||
autofocus: selected,
|
||||
autofocus: AdaptiveLayout.inputDeviceOf(context) == InputDevice.dPad && selected,
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
selected ? Theme.of(context).colorScheme.primaryContainer : Colors.transparent,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue