uriBrowse function

Future<bool> uriBrowse(
  1. String? uri, {
  2. String? webOnlyWindowName,
})

Display an external webpage.

Implementation

Future<bool> uriBrowse(
  String? uri, {
  String? webOnlyWindowName,
}) async {
  //
  bool browse;

  if (uri == null) {
    browse = false;
  } else {
    try {
      await launchUrl(
        Uri.parse(uri),
        webOnlyWindowName: webOnlyWindowName,
      );
      browse = true;
    } catch (e) {
      browse = false;
    }
  }
  return browse;
}