call function

Future<void> call(
  1. String phone
)

Implementation

Future<void> call(String phone) async {
  var url = 'tel:$phone';
  if (await canLaunch(url)) {
    await launch(url);
  } else {
    errorToast(S.current.couldnt_open_the_phone_app);
  }
}