I try to make a phone call from my Flutter app. With the following code:
UrlLauncher.launch(\'tel: xxxxxxxx\');
I found this Function on the
If you are not getting any action on the click of the button, So this is happening because of this. So this is happening because you might not have add tel:// before the number.
Do it this way
Full code is given below
launch(('tel://${mobile_no}')); //launch(('tel://99999xxxxx'));
1) in pubspec.yaml
dependencies:
flutter:
sdk: flutter
url_launcher: ^5.4.10
2) Import wherever you want to use
import 'package:url_launcher/url_launcher.dart';
3) final you call
onPressed: () {
launch(('tel://${item.mobile_no}'));
},