coocaa_flutter_focus 0.4.4 copy "coocaa_flutter_focus: ^0.4.4" to clipboard
coocaa_flutter_focus: ^0.4.4 copied to clipboard

A Flutter focus and interaction library for TV remotes, directional keyboards, gamepads, and touch input.

Changelog #

0.4.4 #

  • Synchronized the focus utilities with the latest navigation and scroll behavior, including spring-based single-tap momentum and improved long-press scrolling.
  • Added FocusScrollEvent, FocusScrollPhase, FocusScrollSource, and FocusScrollListener, plus FocusController.addScrollListener for observing controller-driven scroll lifecycle events.
  • Added FocusableWidget.onTapStateChanged and enableLongPress for pressed state feedback and explicit long-press control.
  • Improved duplicate focusId indexing, route/lifecycle cleanup, directional search caches, detached-node handling, and group edge-padding invalidation.
  • Tuned default single-tap focus scrolling to settle more gently: the base spring frequency is lower and the default duration is 380 ms.
  • Expanded regression coverage with component and benchmark scenarios. The package test suite now includes the synchronized focus-controller and widget tests.

0.4.3 #

  • Added the FocusableGroup.innerFocusMode API and public FocusableGroupInnerFocusMode enum. The default greedy mode preserves the existing in-group behavior; crossing only accepts candidates that overlap the current focus on the cross axis, then delegates to the existing group edge mode and direction limits.
  • Added combined rectangle-distance ordering for non-crossing directional candidates in both in-group and external searches, including greedy group edge comparisons, while preserving crossing priority and scroll-axis ordering.
  • Kept FocusableGroup geometry layout-neutral and avoided extra geometry queries in crossing-only in-group searches.
  • Added regression coverage for combined-distance navigation, inner-focus modes, greedy group comparisons, blocked edge behavior, nested groups, and scrolling behavior. The package now has 150 passing tests.

0.4.2 #

  • Fixed directional entry into an external FocusableGroup when its visual boundary intersects the source focus but its child nodes do not.
  • Kept a group's own geometry stable after focus memory is established; a remembered child inside a nested scrollable can no longer shrink the group's directional comparison rectangle on later entries.
  • Made FocusableGroup use its child's size by default. Applications that need a larger focus area must provide that size through their own layout.
  • Avoided duplicate focusability checks for already-validated external group candidates during directional search.
  • Added regression coverage for raw Focus entry and repeated entry after group memory is established.

0.4.1 #

  • Made physical back keys run registered BackInterceptor callbacks before popup dismissal or route navigation.
  • Added system back (didPopRoute) handling that uses the same interceptor chain, preventing the framework default from bypassing application back handling.
  • Added regression coverage for keyboard and system back interception.

0.4.0 #

  • Prevented focus traversal from selecting nodes and groups owned by a non-current route, including transparent routes layered over a page.
  • Changed physical back keys to execute on matching key release, preventing repeat events from triggering duplicate navigation.
  • Made physical back navigation close the focused popup first, then use Navigator.maybePop(), and exit only when no route handles the request.
  • Added FocusController.handleBack() for explicit application-controlled back handling; registered BackInterceptor callbacks run before navigation for this explicit API.
  • Added regression coverage for route isolation, popup priority, route popping, key lifecycle reset, repeat suppression, and explicit interception.

0.3.0 #

  • Added unified onTap, onDoubleTap, and onLongPress callbacks to FocusableWidget for pointer, keyboard, TV remote, and gamepad input.
  • Added FocusableActionDetails, including action type, input source, focus node, pointer coordinates and kind, and logical key information.
  • Added configurable activation keys with TV, keyboard, and gamepad defaults.
  • Added the global touchEnabled configuration switch, enabled by default.
  • Added the global interactionEnabled switch, enabled by default, to suspend directional focus navigation and FocusableWidget action callbacks.
  • Added runtime configuration propagation and cancellation of pending tap, double-tap, long-press, and directional long-press state.
  • Preserved the fast path for actionless focusable widgets so they do not create gesture recognizers or subscribe to input configuration changes.
  • Added widget tests for pointer and keyboard actions, event exclusivity, focus behavior, external key handling, and runtime configuration changes.
  • Replaced the packaged README banner with a hosted image and removed the local banner asset.

0.2.1 #

  • Switched the README banner and package screenshot to PNG for better pub.flutter-io.cn rendering compatibility.
  • Added .pubignore entries to keep build and local system files out of the published package archive.

0.2.0 #

  • Updated the package as a complete TV focus management library.
  • Added the latest single-file focus controller implementation.
  • Added focusId lookup and request support.
  • Added group edge modes, group memory, edge padding, and focus-enter hooks.
  • Added configurable single-tap and long-press focus scroll behavior.
  • Expanded focus traversal, scrolling, long-press, and cache invalidation tests.
  • Updated package metadata and README documentation.
  • Added a README banner and package badges.
  • Verified and declared minimum SDK constraints as Dart 3.3 and Flutter 3.19.

0.1.0 #

  • Initial release of coocaa_flutter_focus.
  • Added TV-style directional focus navigation through FocusController.
  • Added FocusableWidget and FocusableGroup widgets.
  • Added focus-driven scroll visibility handling and back-key interception.
1
likes
140
points
68
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter focus and interaction library for TV remotes, directional keyboards, gamepads, and touch input.

Repository
View/report issues

Topics

#flutter #focus #tv #keyboard #remote-control

License

MIT (license)

Dependencies

flutter

More

Packages that depend on coocaa_flutter_focus