canLaunch function

Future<bool> canLaunch (String urlString)

Checks whether the specified URL can be handled by some app installed on the device.

Implementation

Future<bool> canLaunch(String urlString) async {
  if (urlString == null) {
    return false;
  }
  return await _channel.invokeMethod(
    'canLaunch',
    <String, Object>{'url': urlString},
  );
}