diff --git a/CHANGELOG.md b/CHANGELOG.md index c840247..07264b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 0.12.0 - feat: adding `NesBlinker`. - fix: `NesRunningText` would not update its text. + - feat: add `HitTestBehavior` property to `NesPressable`. # 0.11.0 - feat: add ability to customize `NesContainer`s pixel sizes. diff --git a/lib/src/widgets/nes_pressabled.dart b/lib/src/widgets/nes_pressabled.dart index 53dca25..c77c985 100644 --- a/lib/src/widgets/nes_pressabled.dart +++ b/lib/src/widgets/nes_pressabled.dart @@ -13,6 +13,7 @@ class NesPressable extends StatefulWidget { this.onPressEnd, this.onPress, this.disabled, + this.behavior, super.key, }); @@ -31,6 +32,9 @@ class NesPressable extends StatefulWidget { /// Child. final Widget child; + /// The behavior of the hit test of this widget. + final HitTestBehavior? behavior; + @override State createState() => _NesPressableState(); } @@ -50,6 +54,7 @@ class _NesPressableState extends State { child: MouseRegion( cursor: SystemMouseCursors.click, child: GestureDetector( + behavior: widget.behavior, onTap: () { widget.onPress?.call(); },