surfstudio / flutter-otp-autofill

Made by Surf 🏄
Apache License 2.0
75 stars 42 forks source link

[BUG] OTP AutoFill hint #9

Closed rGradov closed 1 year ago

rGradov commented 2 years ago

When i tried to implement hint (for number) isn't work. I see popup and then he quickly closed.


  @override
  void initState() {
    // TODO: implement initState
    saveCurrentRoute('$PhoneConnection');
    setRouteArray('$PhoneConnection', true);
    Future.delayed(Duration(milliseconds: 2000))
        .then((value) async => await getNumber());
    super.initState();
  }
Future<dynamic> getNumber() async {
    var _otpInteractor = OTPInteractor();
    String number = await _otpInteractor.hint;
    debugPrint('$number');
  }

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.22000.258], locale ru-RU)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.0 RC2)
[!] Android Studio (not installed)
[√] VS Code (version 1.61.2)
[√] Connected device (4 available)

! Doctor found issues in 1 category.
rGradov commented 2 years ago

i'm tryed to check it on real device

rGradov commented 2 years ago

i checked it in another device and i'm not fully understand - on some devices it works okay for others not

internetova commented 2 years ago

Hello @rGradov,

We tried to reproduce described error on the similar telephone - Huawei p20 like, but we failed. Thank you for provided additional information.

gideonoyekale commented 2 years ago

I think it's not going to read the phone number if the phone number is not stored on the sim card maybe because of sim retriever or other cases