FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
120 stars 18 forks source link

Package Conflict Intl and Flutter_Localization #3185

Closed abegehr closed 3 months ago

abegehr commented 3 months ago

Can we access your project?

Current Behavior

Package resolution fails with:

Because bestes depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because bestes depends on intl 0.18.1, version solving failed.

Expected Behavior

Packages resolve with the code synced from FF project.

Steps to Reproduce

  1. Sync FF project to GitHub
  2. Run flutter pub get

Reproducible from Blank

Bug Report Code (Required)

ITFXlvHqx892rsBE15PIbcdviWIwGUALa+dI0tZ+TQ0jF5D4ELAIZM/sahFoOdSzaH5HPlmlvDsF+sLHhoX1KMcEAxaqfbZFyLp2bxPPbH+tbLbQPpaCP3F8TMZXGmKB1ImrnSRDIthpSC0X3E7zPfO+Zz6Cf9qOYwx5e6fDbOY=

Visual documentation

Screenshot 2024-06-20 at 09 26 55

Environment

- FlutterFlow version: 
- Platform: iOS
- Browser name and version: Chrome 126.0.6478.62
- Operating system and version affected: macOS 14.5 (23F79)

Additional Information

I've tried on the flutter stable and beta channels.

msusviela commented 3 months ago

Hi @abegehr.
I was facing the same issue. My solution was to update flutter to the 3.22.0 version.
Let me know if it solved the issue for you!

abegehr commented 3 months ago

Sadly didn't work:

➜  bestes git:(develop) ✗ flutter --version
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (3 weeks ago) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3
➜  bestes git:(develop) ✗ flutter pub get
Resolving dependencies... (1.7s)
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Because bestes depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because bestes depends on intl 0.18.1, version solving failed.

You can try the following suggestion to make the pubspec resolve:
* Try an upgrade of your constraints: flutter pub upgrade --major-versions

I also tried flutter beta channel, but no luck there either.

abegehr commented 3 months ago

I also tried deleting the pubspec.lock file and running flutter pub get but same error.

This is the vanilla pubspec.yaml file as generated by FlutterFlow:

name: bestes
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.11.7+1

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  auto_size_text: 3.0.0
  cached_network_image: 3.3.1
  carousel_slider: 4.2.1
  chewie: 1.7.1
  cloud_firestore: 4.15.7
  cloud_firestore_platform_interface: 6.1.8
  cloud_firestore_web: 3.10.7
  cloud_functions: 4.6.7
  cloud_functions_platform_interface: 5.5.18
  cloud_functions_web: 4.7.1
  collection: 1.18.0
  dropdown_button2: 2.3.9
  easy_debounce: 2.0.1
  equatable: 2.0.5
  file_picker: 6.1.1
  firebase_analytics: 10.8.8
  firebase_analytics_platform_interface: 3.9.8
  firebase_analytics_web: 0.5.5+20
  firebase_auth: 4.17.7
  firebase_auth_platform_interface: 7.1.7
  firebase_auth_web: 5.9.7
  firebase_core: 2.26.0
  firebase_core_platform_interface: 5.0.0
  firebase_core_web: 2.11.5
  firebase_crashlytics: 3.4.17
  firebase_crashlytics_platform_interface: 3.6.24
  firebase_messaging: 14.7.18
  firebase_messaging_platform_interface: 4.5.26
  firebase_messaging_web: 3.6.7
  firebase_performance: 0.9.3+16
  firebase_performance_platform_interface: 0.1.4+24
  firebase_performance_web: 0.1.4+24
  firebase_storage: 11.6.8
  firebase_storage_platform_interface: 5.1.11
  firebase_storage_web: 3.7.2
  fl_chart: 0.55.0
  flutter_animate: 4.1.1+1
  flutter_cache_manager: 3.3.1
  flutter_native_splash: 2.3.1
  flutter_plugin_android_lifecycle: 2.0.17
  flutter_spinkit: 5.2.0
  flutter_svg: 2.0.9
  font_awesome_flutter: 10.6.0
  from_css_color: 2.0.0
  go_router: 12.1.3
  google_fonts: 6.1.0
  google_sign_in: 6.1.5
  google_sign_in_android: 6.1.20
  google_sign_in_ios: 5.6.4
  google_sign_in_platform_interface: 2.4.2
  google_sign_in_web: 0.12.1
  http: 1.2.0
  image_picker: 1.0.4
  image_picker_android: 0.8.8
  image_picker_for_web: 3.0.1
  image_picker_ios: 0.8.8+2
  image_picker_platform_interface: 2.9.1
  intl: 0.18.1
  json_path: 0.6.2
  lottie: 2.7.0
  map_launcher: 2.5.0+1
  mime_type: 1.0.0
  page_transition: 2.1.0
  path_provider: 2.0.14
  path_provider_android: 2.0.25
  path_provider_foundation: 2.2.2
  path_provider_platform_interface: 2.0.6
  photo_view: 0.14.0
  plugin_platform_interface: 2.1.8
  preload_page_view: 0.2.0
  provider: 6.0.5
  rxdart: 0.27.7
  shared_preferences: 2.2.2
  shared_preferences_android: 2.2.1
  shared_preferences_foundation: 2.3.4
  shared_preferences_platform_interface: 2.3.1
  shared_preferences_web: 2.2.1
  sign_in_with_apple: 4.3.0
  sign_in_with_apple_platform_interface: 1.0.0
  sign_in_with_apple_web: 1.0.1
  sqflite: 2.2.6
  stop_watch_timer: 3.0.2
  stream_transform: 2.1.0
  substring_highlight: 1.0.33
  table_calendar: 3.0.9
  text_search: 1.0.1
  timeago: 3.2.2
  universal_io: 2.2.2
  url_launcher: 6.2.5
  url_launcher_android: 6.3.0
  url_launcher_ios: 6.2.5
  url_launcher_platform_interface: 2.3.2
  video_player: 2.8.1
  video_player_android: 2.4.10
  video_player_avfoundation: 2.5.1
  video_player_platform_interface: 6.2.1
  video_player_web: 2.1.2
  xml: 6.3.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.0

dependency_overrides:
  http: 1.2.0
  uuid: ^4.0.0

dev_dependencies:
  flutter_launcher_icons: 0.13.1
  flutter_lints: 3.0.0
  image: 4.0.17
  lints: 3.0.0

  flutter_test:
    sdk: flutter

flutter_launcher_icons:
  android: true
  ios: true
  remove_alpha_ios: true
  web:
    generate: true
  image_path: 'assets/images/app_launcher_icon.png'

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/fonts/
    - assets/images/
    - assets/videos/
    - assets/audios/
    - assets/lottie_animations/
    - assets/rive_animations/
    - assets/pdfs/
  fonts:
    - family: IconSax
      fonts:
        - asset: assets/fonts/IconSax.ttf

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
abegehr commented 3 months ago

I've tried flutter pub cache repair, same issue.

msusviela commented 3 months ago

Does this happens in any project or just this particular one?

I'm afraid that this issue might be related to some local configuration (at the moment we don't have other issues related to this or users experiencing the same) and this tracker is only for Flutter Flow issues that can be reproduced from blank. Would you mind following up to support so they can take a look further into It? project-specific issue and our support team is our best chance to get it solved. Do you mind following up with them? You can do that either by email: support@flutterflow.io or using the in-app chat inside of FlutterFlow.