Files
HayesGordon 07c6d25de0 feat: flutter hit test self on rive render object
This PR adds hit testing to Flutter by overriding `hitTestSelf` on the Rive RenderObject.

Currently, the hit area is the entire bounding box of the canvas. This means that when a Rive animation is rendered above any other Flutter content (for example, a Stack) all hits are absorbed by Rive and do not pass through.

With this change, Rive will only absorb hits if the pointer comes in contact with a hittable Rive element.

With this change, `handleEvent` will only be called if `hitTestSelf` returns true. There is some duplicate work here as `_processEvent` already performs similar hit test logic, which we can look at optimizing. But `hitTest` needed to be separate method call, as `hitTestSelf` is called before `handleEvent` and `handleEvent` sends additional information (whether it's a pointer down/up etc.).

Diffs=
95beaa4f5 feat: add flutter hit test self on rive render object (#6341)
bd71143bc chore: fix broken docs link (#6360)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2023-12-18 09:00:21 +00:00
..
2022-11-15 23:07:11 +00:00
2023-03-17 18:45:51 +00:00
2020-07-08 16:36:55 -07:00
2020-07-08 16:36:55 -07:00
2023-03-28 23:39:09 +00:00
2023-01-11 21:04:30 +00:00

Rive Flutter Example

A demo application showcasing Rive Flutter.

Getting Started

Clone this repository:

git clone https://github.com/rive-app/rive-flutter

Run the example:

cd rive-flutter/example
flutter pub get
flutter run

Flutter Installation Instructions

If you're new to Flutter, see the official installation instructions.