Skip to content

Picture in Picture

To enable Picture in Picture functionality in your Flutter application, use the following Dart code.

@JS()
library t;
import 'dart:js_interop';
@JS()
external void startPictureInPicture(String textureId, bool enabled);
Future<void> setPictureInPictureEnabled({
required String textureId,
bool enabled = true,
}) async {
startPictureInPicture(textureId, enabled);
}