refactor: simplify & deduplicate

This commit is contained in:
edde746
2025-12-14 21:03:11 +01:00
parent 00d6f920f0
commit a2a5a5ae55
57 changed files with 1636 additions and 1810 deletions
+7
View File
@@ -1,5 +1,12 @@
import 'package:flutter/services.dart';
/// Extension on KeyEvent for common event type checks.
extension KeyEventActionable on KeyEvent {
/// Whether this event should trigger an action (KeyDownEvent or KeyRepeatEvent).
/// Use this to filter out KeyUpEvents early in key handlers.
bool get isActionable => this is KeyDownEvent || this is KeyRepeatEvent;
}
/// Shared sets for keyboard key categories.
final _dpadDirectionKeys = {
LogicalKeyboardKey.arrowUp,