I have a problem that I can’t solve.
I have developed a Flutter app who works with FirebaseAuth and Firebase Cloud Firestore.
In debug mode, on iOS simulator and Android emulator, everything works fine, but on release uploaded on Google Play, the signin and signup no longer work.
I have edited my SHA-1 fingerprint on Firebase with the SHA-1 signing app of Google Play but the problem persists.
If I run the app on release mode in my Android emulator, I have this message:
E/flutter ( 6802): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
E/flutter ( 6802): #0 _SignInScreenState._signin.<anonymous closure> (package:winiz/screens/auth/signin_screen.dart:98)
E/flutter ( 6802): <asynchronous suspension>
E/flutter ( 6802): #1 _SignInScreenState._signin (package:winiz/screens/auth/signin_screen.dart:96)
E/flutter ( 6802): <asynchronous suspension>
E/flutter ( 6802):
I want to specify that on iOS with TestFlight, everything works.
I try to add in the android/app/build.gradle like I see here but not working anymore.
minifyEnabled true
shrinkResources true
Thanks so much for your help.
2
Answers
I found my solution editing the android/app/build.gradle file.
I have modified minifyEnabled to false and shrinkResources to false:
In the
signin_screen.dart
on line number 98, you’re gettingnull
from somewhere, but you’re trying to use that variblae as if it wasMap<String, dynamic>
.Give more details on what’s in that line and around it, then I might be able to tell you more.