Open enesgur opened 4 years ago
There isn't such functionality built in the player but this is something your app can handle. See below code to programmatically toggle fullscreen.
if (widget.orientation == Orientation.landscape) {
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
await SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
} else {
await SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
await SystemChrome.setEnabledSystemUIOverlays([]);
}
You can have a fullscreen button on top of the player that can do this. You will also need to give all available screen space to the player so that the player widget expands to screen edge giving a fullscreen effect.
There isn't such functionality built in the player but this is something your app can handle. See below code to programmatically toggle fullscreen.
if (widget.orientation == Orientation.landscape) { await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); await SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); } else { await SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); await SystemChrome.setEnabledSystemUIOverlays([]); }
You can have a fullscreen button on top of the player that can do this. You will also need to give all available screen space to the player so that the player widget expands to screen edge giving a fullscreen effect.
thank you.
Hi there,
There is no full screen button now but it can be an important feature for android.