dlgBrowser method

Future<void> dlgBrowser({
  1. required String url,
  2. double? height,
  3. String? title,
  4. bool useNativeBrowser = false,
  5. double? width,
})

Shows a browser popup window when running within a mobile or web target environment.

Implementation

Future<void> dlgBrowser({
  required String url,
  double? height,
  String? title,
  bool useNativeBrowser = false,
  double? width,
}) async {
  // Now figure what browser window action we are taking
  if (useNativeBrowser) {
    codemelted_runtime.open(
      scheme: CSchemeType.https,
      popupWindow: true,
      url: url,
      height: height,
      width: width,
    );
    return;
  }

  // We are rendering an inline web view.
  return dlgCustom(
    actions: [
      _buildButton<void>("OK"),
    ],
    content: uiWebView(controller: CWebViewController(initialUrl: url)),
    title: title ?? "Browser",
    height: height,
    width: width,
  );
}