buildView method

  1. @override
Widget buildView(
  1. int? textureId
)
override

Returns a widget displaying the video with a given textureID.

Implementation

@override
Widget buildView(int? textureId) {
  if (defaultTargetPlatform == TargetPlatform.iOS) {
    return UiKitView(
      viewType: 'com.pipflutter/pipflutter_player',
      creationParamsCodec: const StandardMessageCodec(),
      creationParams: {'textureId': textureId!},
    );
  } else {
    return Texture(textureId: textureId!);
  }
}