RenderAndroidView constructor Null safety
- {required AndroidViewController viewController,
- required PlatformViewHitTestBehavior hitTestBehavior,
- required Set<
Factory< gestureRecognizers,OneSequenceGestureRecognizer> > - Clip clipBehavior = Clip.hardEdge}
Creates a render object for an Android view.
Implementation
RenderAndroidView({
required AndroidViewController viewController,
required PlatformViewHitTestBehavior hitTestBehavior,
required Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers,
Clip clipBehavior = Clip.hardEdge,
}) : assert(viewController != null),
assert(hitTestBehavior != null),
assert(gestureRecognizers != null),
assert(clipBehavior != null),
_viewController = viewController,
_clipBehavior = clipBehavior,
super(controller: viewController, hitTestBehavior: hitTestBehavior, gestureRecognizers: gestureRecognizers) {
_viewController.pointTransformer = (Offset offset) => globalToLocal(offset);
updateGestureRecognizers(gestureRecognizers);
_viewController.addOnPlatformViewCreatedListener(_onPlatformViewCreated);
this.hitTestBehavior = hitTestBehavior;
_setOffset();
}