extra_hittest_area 0.1.0 copy "extra_hittest_area: ^0.1.0" to clipboard
extra_hittest_area: ^0.1.0 copied to clipboard

Manually add the extra hitTest area of a widget without changing its size or layout.

extra_hittest_area #

pub package GitHub stars GitHub forks GitHub license GitHub issues flutter-candies

Language: README.md | 中文简体

Manually add the extra hitTest area of a widget without changing its size or layout.

Parent widgets #

The widgets are the same as offical widgets. They are make sure your widget can get hitTest from parent, use them if extra hitTest area are beyond the size of parent.

  • StackHitTestWithoutSizeLimit
  • RowHitTestWithoutSizeLimit, ColumnHitTestWithoutSizeLimit, FlexHitTestWithoutSizeLimit
  • SizedBoxHitTestWithoutSizeLimit

Listener widgets #

  • GestureDetectorHitTestWithoutSizeLimit
  • RawGestureDetectorHitTestWithoutSizeLimit
  • ListenerHitTestWithoutSizeLimit
parameter description default
extraHitTestArea The extra area of hitTest EdgeInsets.zero
debugHitTestAreaColor The color of the extra area null

you can also set ExtraHitTestBase.debugGlobalHitTestAreaColor instead set debugHitTestAreaColor in everytime.

return GestureDetectorHitTestWithoutSizeLimit(
  child: mockButtonUI(text),
  //debugHitTestAreaColor: Colors.pink.withOpacity(0.4),
  extraHitTestArea: const EdgeInsets.all(16),
  onTap: () {
    showToast('$text:onTap${i++}',
        duration: const Duration(milliseconds: 500));
  },
);

Implements other HitTestWithoutSizeLimit #

if some widgets are not included in this package, you can implements them with following classes.

  • RenderBoxHitTestWithoutSizeLimit, RenderBoxChildrenHitTestWithoutSizeLimit
12
likes
130
pub points
85%
popularity

Publisher

verified publisherfluttercandies.com

Manually add the extra hitTest area of a widget without changing its size or layout.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on extra_hittest_area