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.parse("tel:$phoneNumber"),
        mode: _getLaunchMode(mode));
  } catch (e) {
    return false;
  }
}