Is there a way of making a flutter web app enter fullscreen mode (hide addressbar, tabsbar and taskbar)? Or is there a way of programmatically pressing F11?
I've tried...
@override
void dispose() {
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
super.dispose();
}
@override
initState() {
SystemChrome.setEnabledSystemUIOverlays([]);
super.initState();
}
but it didn't work in the web app (I wasn't expecting it to)
You might try this:
import 'dart:html';
void goFullScreen() {
document.documentElement.requestFullscreen();
}
If somebody (like me) wants to exit the fullscreen and struggles to find how:
void exitFullScreen() {
document.exitFullscreen();
}
Hope that's useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With