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

await SmsAutoFill().hint not working #233

Open
Shub0327 opened this issue Jun 11, 2024 · 1 comment
Open

await SmsAutoFill().hint not working #233

Shub0327 opened this issue Jun 11, 2024 · 1 comment

Comments

@Shub0327
Copy link

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();

Timer(Duration(milliseconds: 1000), () {
  initMobileNumberState();
});

}

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}'");
}
}

@sahilmehra98
Copy link
Contributor

Which version of the plugin are you using?

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