phone static method

Future<bool> phone({
  1. String phoneNumber = "",
  2. OpenMode mode = OpenMode.platformDefault,
})

open phone dial

Implementation

static Future<bool> phone(
    {String phoneNumber = "",
    OpenMode mode = OpenMode.platformDefault}) async {
  try {
    return await launchUrl(Uri(scheme: 'tel', path: phoneNumber),
        mode: _getLaunchMode(mode));
  } catch (e) {
    log(e.toString());
    return false;
  }
}