Flutter 中的 Direct Caller 数据包问题

问题描述 投票:0回答:0

我遇到了一个问题,当我直接打电话时,它没有成功,它只是带我到呼叫应用程序并输入号码,我必须打电话,有没有办法自动呼叫?,我一直在使用 flutter_phone_direct_caller: ^2.1.1 和 url_launcher: ^6.1.10 的库,但都没有用。

FloatingActionButton(
  backgroundColor: Colors.white,
  child: const Icon(Icons.call, color: Colors.green),
  onPressed: () async {
    final String call = mapMarkers[index].phone;
    Uri url = Uri(scheme: "tel", path: '3193439063');
    if ( await canLaunchUrl(url)){
      await launchUrl(url);
    } else {
      print('cannot launch this url');
    }
  },
),
flutter call dart-pub
© www.soinside.com 2019 - 2024. All rights reserved.