openUrl static method

Future<void> openUrl(
  1. String input
)

Opens a given URL string in the device’s external application.

Implementation

static Future<void> openUrl(String input) async {
  final uri = Uri.parse(input);
  if (await canLaunchUrl(uri)) {
    await launchUrl(uri, mode: LaunchMode.externalApplication);
  }
}