-
Notifications
You must be signed in to change notification settings - Fork 189
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
await SmsAutoFill().hint not working #233
Comments
Which version of the plugin are you using? |
i am using your example code and its says phone number not found [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: PlatformException(ERROR, 16: [28438] No phone number is found on this device., com.google.android.gms.common.api.ApiException: 16: [28438] No phone number is found on this device. |
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.auth.api.credentials.HintRequest$Builder" on path: DexPathList
@OverRide
void initState() {
super.initState();
}
Future initMobileNumberState() async {
try {
String? hint = await SmsAutoFill().hint;
String? number = _formatPhoneNumber(hint ?? "");
_signInController.phoneNumberController.text = number;
// _signInController.phoneNumber.value = number;
} on PlatformException catch (e) {
debugPrint("Failed to get mobile number because of '${e.message}'");
}
}
The text was updated successfully, but these errors were encountered: