I created a project and added https://github.com/google/inject.dart to my project but when i want to generate dependency injection
I got below Error when i want to build DI with flutter packages pub run build_runner build
[INFO] Generating build script...
[INFO] Generating build script completed, took 489ms
[INFO] Creating build script snapshot......
[INFO] Creating build script snapshot... completed, took 9.2s
[SEVERE] Failed to snapshot build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
[SEVERE] lib/q35/injection/inject.dart/package/inject_generator/lib/src/graph.dart:20:6: Error: The language version override has to be the same in the library and its part(s).
part 'graph/injector_graph.dart';
^
lib/q35/injection/inject.dart/package/inject_generator/lib/src/graph.dart:21:6: Error: The language version override has to be the same in the library and its part(s).
part 'graph/injector_graph_resolver.dart';
^
lib/q35/injection/inject.dart/package/inject_generator/lib/src/graph.dart:22:6: Error: The language version override has to be the same in the library and its part(s).
part 'graph/summary_reader.dart';
^
lib/q35/injection/inject.dart/package/inject_generator/lib/src/summary.dart:14:6: Error: The language version override has to be the same in the library and its part(s).
part 'summary/injectable_summary.dart';
^
lib/q35/injection/inject.dart/package/inject_generator/lib/src/summary.dart:15:6: Error: The language version override has to be the same in the library and its part(s).
part 'summary/injector_summary.dart';
^
lib/q35/injection/inject.dart/package/inject_generator/lib/src/summary.dart:16:6: Error: The language version override has to be the same in the library and its part(s).
part 'summary/library_summary.dart';
^
lib/q35/injection/inject.dart/package/inject_generator/lib/src/summary.dart:17:6: Error: The language version override has to be the same in the library and its part(s).
part 'summary/module_summary.dart';
^
lib/q35/injection/inject.dart/package/inject_generator/lib/src/summary.dart:18:6: Error: The language version override has to be the same in the library and its part(s).
part 'summary/provider_summary.dart';
^
pub finished with exit code 78
and here is my inject_generator_build.yaml:
# Read about `build.yaml` at https://pub.dartlang.org/packages/build_config
builders:
inject_generator:
target: ":inject_generator"
import: "package:inject_generator/inject_generator.dart"
builder_factories:
- "summarizeBuilder"
- "generateBuilder"
build_extensions:
".dart":
- ".inject.summary"
- ".inject.dart"
auto_apply: dependents
build_to: source