createPlatformView static method

Widget? createPlatformView(
  1. dynamic onViewCreated(
    1. int viewID
    ), {
  2. Key? key,
})

Create a PlatformView and return the view ID

Implementation

static Widget? createPlatformView(Function(int viewID) onViewCreated,
    {Key? key}) {
  if (kIsIOS || kIsMacOS) {
    return UiKitView(
        key: key,
        viewType: 'plugins.zego.im/superboard_view',
        onPlatformViewCreated: (int viewID) {
          onViewCreated(viewID);
        });
  } else if (kIsAndroid) {
    return AndroidView(
        key: key,
        viewType: 'plugins.zego.im/superboard_view',
        onPlatformViewCreated: (int viewID) {
          onViewCreated(viewID);
        });
  }
  return null;
}