PlatformViewLink constructor Null safety

const PlatformViewLink(
  1. {Key? key,
  2. required PlatformViewSurfaceFactory surfaceFactory,
  3. required CreatePlatformViewCallback onCreatePlatformView,
  4. required String viewType}
)

Construct a PlatformViewLink widget.

The surfaceFactory and the onCreatePlatformView must not be null.

See also:

Implementation

const PlatformViewLink({
  Key? key,
  required PlatformViewSurfaceFactory surfaceFactory,
  required CreatePlatformViewCallback onCreatePlatformView,
  required this.viewType,
  }) : assert(surfaceFactory != null),
       assert(onCreatePlatformView != null),
       assert(viewType != null),
       _surfaceFactory = surfaceFactory,
       _onCreatePlatformView = onCreatePlatformView,
       super(key: key);