requestFullscreen method Null safety

Future<void> requestFullscreen(
  1. [Map? options]
)

Displays this element fullscreen.

Other resources

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();
}