Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[General]: dependency conflict with intl package version #1395

Closed
1 of 7 tasks
ArturAssisComp opened this issue May 23, 2024 · 0 comments · Fixed by #1394
Closed
1 of 7 tasks

[General]: dependency conflict with intl package version #1395

ArturAssisComp opened this issue May 23, 2024 · 0 comments · Fixed by #1394
Labels
bug Something isn't working

Comments

@ArturAssisComp
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

9.2.1

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [versão 10.0.22631.3593], locale pt-BR)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Ferramentas de Build do Visual Studio 2022 17.8.0)
[√] Android Studio (version 2023.1)
[√] Connected device (3 available)
[√] Network resources

• No issues found!

Minimal code example

Code sample
# example/pubspec.yaml
name: example
description: Example app for flutter_form_builder package
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
  sdk: '>=3.0.0 <4.0.0'
  flutter: ">=3.10.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_form_builder:
    path: ../
  form_builder_validators: ^9.0.0-dev.1
  flutter_localizations:
    sdk: flutter
  intl: ^0.18.0

dev_dependencies:
  flutter_lints: ^2.0.1
  flutter_test:
    sdk: flutter


flutter:
  uses-material-design: true

Current Behavior

Unable to install dependencies from both pubspec.yaml and example/pubspec.yaml because the package intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK (my version is 3.22) but to version ^0.18.0 by example/pubspec.yaml.

Changing the example/pubspec.yaml to 0.19.0 also does not work because form_builder_validators ^9.0.0-dev.1 also depends on intl ^0.18.0.

Expected Behavior

Successful installation of dependencies for both pubspec.yaml and example/pubspec.yaml.

Steps To Reproduce

  1. Setup the environment to the same as in my flutter doctor
  2. Setup the repository
  3. Try the commands to install dependencies: flutter pub get in the root directory of the project and in example directory.

Aditional information

Possible temporary workarounds:

  1. Update dependencies for form_builder_validators to ^10.0.1 and intl to ^0.19.0 in example/pubspeck.yaml to:
name: example
description: Example app for flutter_form_builder package
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
  sdk: '>=3.0.0 <4.0.0'
  flutter: ">=3.10.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_form_builder:
    path: ../
  form_builder_validators: ^10.0.1
  flutter_localizations:
    sdk: flutter
  intl: ^0.19.0

dev_dependencies:
  flutter_lints: ^2.0.1
  flutter_test:
    sdk: flutter


flutter:
  uses-material-design: true
  1. Add dependency overrides field for intl ^0.19.0:
name: example
description: Example app for flutter_form_builder package
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
  sdk: '>=3.0.0 <4.0.0'
  flutter: ">=3.10.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_form_builder:
    path: ../
  form_builder_validators: ^9.0.0-dev.1
  flutter_localizations:
    sdk: flutter
  intl: ^0.18.0

dev_dependencies:
  flutter_lints: ^2.0.1
  flutter_test:
    sdk: flutter

dependency_overrides:
  intl: ^0.19.0

flutter:
  uses-material-design: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
1 participant