call static method
拨打电话
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('拨号失败');
}
}
拨打电话
static void call({required String phone}) async {
if (await canLaunchUrl(Uri(scheme: 'tel', path: phone))) {
await launchUrl(Uri(scheme: 'tel', path: phone));
} else {
print('拨号失败');
}
}