'Google sign-in doesn't work after releasing apk from flutter

The app in debug mode was working fine and everything is good. after releasing apk, Google sign-in doesn't work. I tried all the possible solutions, I checked for the SHA1 key and all is good and added everything in the Gradle. nothing is missing but it still, gives me an error.

enter image description here

here are the Gradle files here are the Gradle files enter image description here

and when I use it in debug mode, it works again like flutter run but if I run fluter install and use the installed apk it doesn't work and it gives this error

here is the function

here is the function

here is how I call it here is how I call it



Solution 1:[1]

I had similar problem, in my case with firebase token, this post helped. MissingPluginException for quick_actions plugin in release mode

Quote from the accepted answer:

As of now to remove this issue from the release mode I added shrinkResources false in the app level build.grade file of android folder.

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 F43nd1r