Skip to content
pubscout

focusable_control_builder

1.2.0, released 7 months ago by gskinner.com

Easily create custom controls that respond correctly to mouse and keyboard.

WASM-ready
$ flutter pub add focusable_control_builder
Source repository

What it does

Wraps FocusableActionDetector to quickly create custom controls that handle tab key traversal, focus and rollover states, modified mouse cursors, and keyboard shortcuts. Allows you to build custom interactive components using a builder method.

AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build a custom button or interactive control that supports keyboard traversal and shortcuts.
  • You want consistent hover, focus, and pressed states across different platforms.

Skip it when

  • You are satisfied with using standard Material or Cupertino buttons without custom styling needs.

Strengths

  • Handles complex focus, hover, and keyboard shortcut logic automatically.
  • Cross-platform support including web, desktop, and mobile.

Weaknesses

  • Relies entirely on standard Flutter focus mechanics, which can still be verbose for highly complex nested control trees.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
FocusableControlBuilder(
  onPressed: onPressed,
  builder: (_, FocusableControlState control) {
    return Container(
      child: Text(label),
    );
  },
)

Alternatives

Packages that do the same job and could replace focusable_control_builder.