AndroidView constructor

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

Creates a widget that embeds an Android view.

If creationParams is not null then creationParamsCodec must not be null.

Implementation

const AndroidView({
  super.key,
  required this.viewType,
  this.onPlatformViewCreated,
  this.hitTestBehavior = PlatformViewHitTestBehavior.opaque,
  this.layoutDirection,
  this.gestureRecognizers,
  this.creationParams,
  this.creationParamsCodec,
  this.clipBehavior = Clip.hardEdge,
}) : assert(creationParams == null || creationParamsCodec != null);