call static method

void call({
  1. required String phone,
})

拨打电话

Implementation

static void call({required String phone}) async {
  if (await canLaunchUrl(Uri(scheme: 'tel', path: phone))) {
    await launchUrl(Uri(scheme: 'tel', path: phone));
  } else {
    print('拨号失败');
  }
}