RenderAndroidView constructor Null safety

RenderAndroidView(
  1. {required AndroidViewController viewController,
  2. required PlatformViewHitTestBehavior hitTestBehavior,
  3. required Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers,
  4. 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();
}