AndroidView constructor Null safety
- {Key? key,
- required String viewType,
- PlatformViewCreatedCallback? onPlatformViewCreated,
- PlatformViewHitTestBehavior hitTestBehavior = PlatformViewHitTestBehavior.opaque,
- TextDirection? layoutDirection,
- Set<
Factory< ? gestureRecognizers,OneSequenceGestureRecognizer> > - dynamic creationParams,
- MessageCodec? creationParamsCodec,
- Clip clipBehavior = Clip.hardEdge}
Creates a widget that embeds an Android view.
The viewType
and hitTestBehavior
parameters must not be null.
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(viewType != null),
assert(hitTestBehavior != null),
assert(creationParams == null || creationParamsCodec != null),
assert(clipBehavior != null);