'Sms code auto retrieval (auto detect and login) not working Flutter

I've my flutter app using firebase phone authentication. Its working all fine if code is manually added like use the app on some other phone and give some other number on different phone but if the app is being used in the same phone then it auto retrieves the otp and upon auto retrieving it doesn't logs in the user. I've tried latest firebase core and auth to older one's available in null safety one's but non are working. I've android device verification active from cloud console and sha1 and sha256 keys are there too note that the auth works when manually added so and also I don't have my app on store yet its a under development app I've seen hash thing issues but my app isn't on store so there shouldn't be hash key issue. If anyone have encountered this issue then please help. Related issue posted here as well but not working for me



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source