Closed vinnytwice closed 3 years ago
Finally found the problem. It of course was due to the update of the cloud_firestore
package. As it now has the web version which conflicts with firebase
package. The latest compatible version is cloud_firestore: 0.14.0
and until remote config will also have a web version I'm stuck using firebase
package for the web version of my apps..
Also the Firebase initialisation method differs: new not working:
class MyApp extends StatelessWidget {
final Future<FirebaseApp> _initialization = Firebase.initializeApp();
@override
Widget build(BuildContext context) {
// Locale myLocale = Localizations.localeOf(context);
return FutureBuilder(
future: _initialization,
builder: (context, snapshot){
if(snapshot.hasError){
}
if (snapshot.connectionState == ConnectionState.done){
return MaterialApp(
...
old working:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
BlocSupervisor.delegate = SimpleBlocDelegate();
setupLocator();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Locale myLocale = Localizations.localeOf(context);
return MaterialApp(
...
Hope it helps others as Firebase is always breaking the code with almost any update..
I also have this issue. I'm interested in case someone have found a workaround!
Also following : https://stackoverflow.com/questions/68365453/flutter-with-firebase-realtime-database-mobile-and-web
I'm not sure what I changed as my app was built and is in my Android tablet, but last week I started getting a long list of errors and the build fails. I use
firebase
package for the web version of the app, and I basically initialise it in a Singleton and my repositories are all with conditional import via a Stub / Switcher(abstract class an methods) / WebImplementation ( using firebase package methods ) / DeviceImplementation ( using official packages methods) as I show here in my answer to my own question.. https://stackoverflow.com/questions/59670753/flutter-firebase-realtime-database-in-web/61982735#61982735 It all worked great until I switched to Firestore.. but the errors don't seem Firestore related.. I get same errors with 7.3.3 version. Can you spot what's goin' one here?? Thank you very much.