I cant use build_runner: ^2.1.11
in flutter without adding analyzer: ^4.2.0.
when its add it's possible to generate build_runner files like .g.dart
and freezed.dart without any issues. but when it comes to injectable_generator: ^1.5.3
I can't even add injectable generator to the pubspec
as it shows error due to analyzer.
My needs where about:
Running
flutter pub run build_runner build --delete-conflicting-outputs
without adding analyzer. 2.which version ofanalyzer
is used to make compatible withinjactable_runner
to support for build_runner. 3.Is there any alternative otpion to fix this issue to compine verisons.please check my pubsec file and analys e the error in it.
dependencies: analyzer: ^4.2.0 bordered_text: ^2.0.0 cupertino_icons: ^1.0.2 dartz: ^0.10.1 dio: ^4.0.6 flutter: sdk: flutter flutter_bloc: ^8.0.1 freezed_annotation: ^2.0.3 get_it: ^7.2.0 google_fonts: ^3.0.1 http: ^0.13.4 injectable: ^1.5.3 json_annotation: ^4.5.0 json_serializable: ^6.3.0 video_player: ^2.4.5
dev_dependencies:
build_runner: ^2.1.11 flutter_lints: ^2.0.0 flutter_test: sdk: flutter freezed: ^2.0.4