getOptions method

  1. @override
  2. @Deprecated('Use getSettings instead')
Future<InAppWebViewGroupOptions?> getOptions()

Use getSettings instead.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView
  • Web <iframe> but requires same origin
  • Windows WebView2

Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.

Implementation

@override
@Deprecated('Use getSettings instead')
Future<InAppWebViewGroupOptions?> getOptions() async {
  InAppWebViewSettings? settings = await getSettings();

  Map<dynamic, dynamic>? options = settings?.toMap();
  if (options != null) {
    options = options.cast<String, dynamic>();
    return InAppWebViewGroupOptions.fromMap(options as Map<String, dynamic>);
  }

  return null;
}