hitTestOnBinding method

  1. @override
HitTestResult hitTestOnBinding(
  1. Offset location, {
  2. int? viewId,
})
override

Forwards the given location to the binding's hitTest logic.

Implementation

@override
HitTestResult hitTestOnBinding(Offset location, {int? viewId}) {
  viewId ??= view.viewId;
  final RenderView renderView = binding.renderViews.firstWhere((RenderView r) => r.flutterView.viewId == viewId);
  location = binding.localToGlobal(location, renderView);
  return super.hitTestOnBinding(location, viewId: viewId);
}