open_url 2.0.1 copy "open_url: ^2.0.1" to clipboard
open_url: ^2.0.1 copied to clipboard

Open a URL on the user's default application. Helpful on DartVM, on Flutter use url_launcher instead.

example/open_url_example.dart

import 'package:open_url/open_url.dart';

void main() async {
  final result = await openUrl('https://github.com/renatoathaydes/open_url');
  if (result.exitCode == 0) {
    print('URL should be open in your browser');
  } else {
    print('Something went wrong (exit code = ${result.exitCode}): '
        '${result.stderr}');
  }
}
16
likes
160
points
535
downloads

Publisher

unverified uploader

Weekly Downloads

Open a URL on the user's default application. Helpful on DartVM, on Flutter use url_launcher instead.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on open_url