onCall static method

Future<bool> onCall(
  1. String phoneNumber
)

打电话 phoneNumber 电话号码 10086 若不支持打电话则返回false

Implementation

static Future<bool> onCall(String phoneNumber) async {
  Uri uri = Uri(scheme: 'tel', path: phoneNumber);
  if (!await onCanLaunchUrl(uri.toString())) return false;
  return await launchUrl(uri);
}