UiKitView constructor Null safety

const UiKitView(
  1. {Key? key,
  2. required String viewType,
  3. PlatformViewCreatedCallback? onPlatformViewCreated,
  4. PlatformViewHitTestBehavior hitTestBehavior,
  5. TextDirection? layoutDirection,
  6. dynamic creationParams,
  7. MessageCodec? creationParamsCodec,
  8. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers}
)

Creates a widget that embeds an iOS view.

The viewType and hitTestBehavior parameters must not be null. If creationParams is not null then creationParamsCodec must not be null.

Implementation

const UiKitView({
  Key? key,
  required this.viewType,
  this.onPlatformViewCreated,
  this.hitTestBehavior = PlatformViewHitTestBehavior.opaque,
  this.layoutDirection,
  this.creationParams,
  this.creationParamsCodec,
  this.gestureRecognizers,
}) : assert(viewType != null),
     assert(hitTestBehavior != null),
     assert(creationParams == null || creationParamsCodec != null),
     super(key: key);