PlatformViewLink constructor Null safety
- {Key? key,
- required PlatformViewSurfaceFactory surfaceFactory,
- required CreatePlatformViewCallback onCreatePlatformView,
- required String viewType}
Construct a PlatformViewLink widget.
The surfaceFactory
and the onCreatePlatformView
must not be null.
See also:
- PlatformViewSurface for details on the widget returned by
surfaceFactory
. - PlatformViewCreationParams for how each parameter can be used when implementing
createPlatformView
.
Implementation
const PlatformViewLink({
super.key,
required PlatformViewSurfaceFactory surfaceFactory,
required CreatePlatformViewCallback onCreatePlatformView,
required this.viewType,
}) : assert(surfaceFactory != null),
assert(onCreatePlatformView != null),
assert(viewType != null),
_surfaceFactory = surfaceFactory,
_onCreatePlatformView = onCreatePlatformView;