flutterversionflutter-packagesawesome-notifications

Flutter intl version conflict breaks awesome_notifications build


I'm facing a complex version conflict between Flutter packages in my project.

I use the following dependencies:

flutter_localizations → depends on intl: 0.19.0

My app originally had intl: ^0.20.0

awesome_notifications: ^0.10.1 → also depends on intl: ^0.20.0

To resolve the conflict with flutter_localizations, I downgraded intl to 0.19.0, but then had to downgrade awesome_notifications to 0.10.0, since newer versions require intl 0.20.0.

After downgrading awesome_notifications, I now get this Java compilation error when building:

DartBackgroundExecutor.java:74: error: cannot find symbol
    private static io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
                                                          ^
  symbol:   class PluginRegistrantCallback
  location: interface PluginRegistry

DartBackgroundExecutor.java:86: error: cannot find symbol
            io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback callback) {
                                                   ^
  symbol:   class PluginRegistrantCallback
  location: interface PluginRegistry

So now I’m stuck:

Using intl 0.19.0 breaks awesome_notifications.

Using intl 0.20.0 breaks flutter_localizations.

I need:

Either a way to make all of them work together.

Or a workaround for this PluginRegistrantCallback issue in awesome_notifications 0.10.0.

Any help to cleanly resolve this version triangle without having to manually fork packages would be deeply appreciated!

This is the output of flutter doctor -v

[√] Flutter (Channel stable, 3.29.3, on Microsoft Windows [Version
    10.0.26100.3915], locale en-IN) [458ms]
    • Flutter version 3.29.3 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea121f8859 (4 weeks ago), 2025-04-11 19:10:07 +0000
    • Engine revision cf56914b32
    • Dart version 3.7.2
    • DevTools version 2.42.3

[√] Windows Version (11 Home Single Language 64-bit, 24H2, 2009) [2.9s]

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    [3.6s]
    • Android SDK at C:\Users\imhpa\AppData\Local\Android\sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: C:\Users\imhpa\AppData\Local\Programs\Android
      Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on
      this machine.
      To manually set the JDK path, use: `flutter config
      --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13355223-b631.42)
    • All Android licenses accepted.

[√] Chrome - develop for the web [126ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.3)
    [124ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.11.35303.130
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2024.3) [23ms]
    • Android Studio at C:\Users\imhpa\AppData\Local\Programs\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13355223-b631.42)

[√] VS Code (version 1.99.3) [21ms]
    • VS Code at C:\Users\imhpa\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.110.0

[√] Connected device (3 available) [375ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version
      10.0.26100.3915]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome
      135.0.7049.115
    • Edge (web)        • edge    • web-javascript • Microsoft Edge
      136.0.3240.50

[√] Network resources [671ms]
    • All expected network resources are available.

• No issues found!

Solution

  • as a workaround for now you can add this on your pubspec.yaml

    dependency_overrides:
      intl: ^0.19.0