jaumard / sms_autofill

Flutter plugin to provide SMS code autofill support
MIT License
281 stars 173 forks source link

await SmsAutoFill().hint not working #233

Open Shub0327 opened 2 weeks ago

Shub0327 commented 2 weeks ago

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 commented 2 weeks ago

Which version of the plugin are you using?