hitTest method

  1. @override
bool hitTest(
  1. Offset position
)
override

Determine if a pointer event occurred within the widget's bounds and to check if a hit occurred on a Rive listener.

Implementation

@override
bool hitTest(Offset position) {
  final artboard = _artboard;
  if (artboard == null) {
    return false;
  }
  final value = stateMachine?.hitTest(
        localToArtboard(
          position: position,
          artboardBounds: artboard.bounds,
          fit: fit,
          alignment: alignment,
          size: _lastSize,
          scaleFactor: layoutScaleFactor,
        ),
      ) ??
      false;
  return value;
}