I cannot get my Flutter build to run with all the latest versions of Flutter, build_runner and json_serializable because it seems like json_serializable is still depending on an old version of build. Here is my pubspec.yaml
name: myproject
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.17.0
cupertino_icons: ^1.0.2
firebase_core: ^1.0.1
firebase_auth: ^1.0.1
firebase_database: ^6.1.0
firebase_analytics: ^7.1.1
firebase_crashlytics: ^1.0.0
firebase_performance: ^0.6.0
cloud_firestore: ^1.0.1
google_fonts: ^2.0.0
logger: ^0.9.4
flutter_bugfender: ^1.2.2
url_launcher: ^6.0.2
flutter_markdown: ^0.6.0
intl_phone_field: ^1.4.4
pin_code_fields: ^7.0.0
json_annotation: ^4.0.0
form_validators: ^0.3.0
uuid: ^3.0.1
date_time_picker: #^1.1.1
git:
url: git://github.com/m3uzz/date_time_picker.git
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^1.12.1
json_serializable: ^4.0.2
dependency_overrides:
flutter:
generate: true
uses-material-design: true
assets:
- assets/images/
And here is the error I get when running flutter pub get
Because json_serializable >=4.0.0 depends on build ^1.6.1 and build_runner >=1.12.0 depends on build >=2.0.0 <2.1.0, json_serializable >=4.0.0 is incompatible with build_runner >=1.12.0.
So, because blindly depends on both build_runner ^1.12.1 and json_serializable ^4.0.2, version solving failed.
pub get failed (1; So, because blindly depends on both build_runner ^1.12.1 and json_serializable ^4.0.2, version solving failed.)
Blocked on pkg:source_gen migrating 鈥撀爓hich is blocked on pkg:dart_style
This Flutter 2 release is really one hell of a dependency hot mess
@sarbogast I agree and the blockers are not get resolved as quickly as needed.
@sarbogast @pratikpparikh 鈥撀爐he ecosystem is HUGE and very complex. Mistakes here cause a lot of problems so we're being very careful. Your patience is appreciated.
@kevmoo Amazing, you fixed it in almost exactly the moment I ran into it. Thanks! :)
Most helpful comment
This Flutter 2 release is really one hell of a dependency hot mess