buildView method
Returns a widget displaying the video with a given textureID.
Implementation
@override
Widget buildView(PlatformViewCreatedCallback onPlatformViewCreated) {
// return Texture(textureId: textureId);
if (Platform.isAndroid) {
return AndroidView(
viewType: 'flutter.io/videoPlayer/view',
hitTestBehavior: PlatformViewHitTestBehavior.transparent,
onPlatformViewCreated: onPlatformViewCreated,
creationParamsCodec: const StandardMessageCodec(),
);
} else if (Platform.isIOS) {
return UiKitView(
viewType: 'flutter.io/videoPlayer/view',
onPlatformViewCreated: onPlatformViewCreated,
hitTestBehavior: PlatformViewHitTestBehavior.transparent,
creationParamsCodec: const StandardMessageCodec(),
);
}
return Text('Requested platform is not yet supported by this plugin');
}