cc976a
cc976a

Reputation: 117

Plugin and Version Conflict with Firebase Messaging

I have an app that is currently running on the Play Store, built using AndroidStudio, but I want to add the feature of adding notifications to the users. I have been told the best way to do this is through Firebase Messaging.

I added the plugin (version 9.0.0) but this initially caused a conflict issue with the Dart SDK version. I had 2.10 but needed 2.12 So I did the following:

  1. Upgraded Flutter - so I was on version 2.12
  2. Then started upgrading all plugin version which then caused conflicts because of the 2.12 version
  3. I reached the first major conflict because of Flutter_Form_Builder. Even the latest version required Intl plugin to be version 0.16.1 but Firebase Auth required version 0.17.0
  4. Tried the hacks here but none worked - https://github.com/danvick/flutter_form_builder/issues/634
  5. I then downgraded back to version 2.10
  6. Changed back the plugin versions due to the conflict messages
  7. Tried installing the earlier version of Firebase Messaging (7.0.2) - but this didn't work as it created a separate major conflict. Firebase Messaging (7.0.2) requires Firebase Core 0.5.1 whereas the Cloud Firestore plugin needs Firebase Core 0.7.0

I'm sure many of you have been here many times before - but this is my first time.

The biggest clash I seem to have is that I can't have both Flutter Form Builder and Firebase Messaging, and will either have to wait for Flutter Form Builder to release a new version or rebuild the entire app away from this plugin (a lot is built around it).

Before I give up on Firebase Messaging I just want to make sure there isn't a different option here I can't see?

Upvotes: 1

Views: 806

Answers (1)

xamantra
xamantra

Reputation: 1016

Can you try if this works? I tested this just earlier. I was able to "flutter pub get" successfully.

dependencies:
  # other deps here.
  firebase_core: 0.5.3
  firebase_messaging: 7.0.3
  firebase_auth: 0.18.4+1
  cloud_firestore: 0.14.4
  flutter_form_builder: 4.2.0
  # other deps here.

dependency_overrides:
  intl: "<0.16.0"

I'm not sure if there are major API differences between these firebase packages. But you might want to try your luck with these versions.

Upvotes: 2

Related Questions