buildGromoreOhosPlatformView function
Widget
buildGromoreOhosPlatformView({
- required String viewType,
- required Map<
String, dynamic> creationParams, - required PlatformViewCreatedCallback onPlatformViewCreated,
- required Set<
Factory< gestureRecognizers,OneSequenceGestureRecognizer> >
创建鸿蒙原生广告视图。
Implementation
Widget buildGromoreOhosPlatformView({
required String viewType,
required Map<String, dynamic> creationParams,
required PlatformViewCreatedCallback onPlatformViewCreated,
required Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers,
}) {
final GromoreOhosPlatformViewBuilder? builder = _ohosPlatformViewBuilder;
if (builder == null) {
return ErrorWidget(
'HarmonyOS 平台请改为导入 gromore_ads_kit_ohos.dart,'
'并在 runApp 前调用 registerGromoreAdsKitOhosPlatformViews()。',
);
}
return builder(
viewType: viewType,
creationParams: creationParams,
onPlatformViewCreated: onPlatformViewCreated,
gestureRecognizers: gestureRecognizers,
);
}