how to open a contact or phone call or keypad menu using dart in flutter inside the icon button inside onPressed?
new IconButton(icon: new Icon(Icons.call, color: Colors.blue,), onPressed: null),
Thanks.
how to open a contact or phone call or keypad menu using dart in flutter inside the icon button inside onPressed?
new IconButton(icon: new Icon(Icons.call, color: Colors.blue,), onPressed: null),
Thanks.
This method will open the dialer :
_launchCaller() async { const url = "tel:1234567"; if (await canLaunch(url)) { await launch(url); } else { throw 'Could not launch $url'; } }
EDIT:
In case anybody facing errors:
Add url_launcher: in the pubspec.yaml & run flutter get
Also import 'package:url_launcher/url_launcher.dart';