Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only Opens Dialer with number #6

Open
M6268 opened this issue Jul 22, 2020 · 1 comment
Open

Only Opens Dialer with number #6

M6268 opened this issue Jul 22, 2020 · 1 comment

Comments

@M6268
Copy link

M6268 commented Jul 22, 2020

It does not initiates call by default, it launches dialer with number.

Is there any way to make a call directly?

@rehamalraee
Copy link

I did it by creating new function inside flutter_phone_state.dart
and call it instead of _openTelLink

Future _makeDirectCall(String number) async {
if (number == null) {
return CallStartResult.invalidInput;
}
if ( await FlutterPhoneDirectCaller.callNumber(number)) {
return (await FlutterPhoneDirectCaller.callNumber(number))
? CallStartResult.success
: CallStartResult.failed;
} else {
return CallStartResult.unsupported;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants