requestFullscreen method Null safety
- [Map? options]
Displays this element fullscreen.
Other resources
- Fullscreen API from MDN.
- Fullscreen specification from W3C.
Implementation
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.SAFARI)
Future<void> requestFullscreen([Map? options]) {
var retValue;
if (options != null) {
retValue = JS(
'',
'(#.requestFullscreen||#.webkitRequestFullscreen).call(#, #)',
this,
this,
this,
convertDartToNative_Dictionary(options));
} else {
retValue = JS(
'',
'(#.requestFullscreen||#.webkitRequestFullscreen).call(#)',
this,
this,
this);
}
if (retValue != null) return promiseToFuture(retValue);
return Future<void>.value();
}