hitTest method
Future<List<UArHitResult> >
hitTest(
- Offset point, {
- List<
UArHitType> types = const <UArHitType>[UArHitType.plane, UArHitType.depth, UArHitType.point, UArHitType.estimated, UArHitType.instant, UArHitType.mesh],
Real-world surfaces under a point of the view (logical pixels), nearest first.
Implementation
Future<List<UArHitResult>> hitTest(
Offset point, {
List<UArHitType> types = const <UArHitType>[UArHitType.plane, UArHitType.depth, UArHitType.point, UArHitType.estimated, UArHitType.instant, UArHitType.mesh],
}) async {
final Offset n = _normalize(point);
final List<Object?>? raw = await _invoke<List<Object?>>("hitTest", <String, Object?>{"x": n.dx, "y": n.dy, "types": types.map((UArHitType t) => t.name).toList(growable: false)});
return _maps(raw).map(UArHitResult.fromMap).toList(growable: false);
}