openUrl method

  1. @override
Future<void> openUrl(
  1. String url
)
override

Open url in the default browser.

Implementation

@override
Future<void> openUrl(String url) async {
  final cmd = switch (_platform) {
    NativePlatform.macos => 'open',
    NativePlatform.linux => 'xdg-open',
    NativePlatform.windows => 'start',
    _ => null,
  };
  if (cmd != null) await _runSimple(cmd, [url]);
}