Reputation: 23
I added json serializabe in my pubspec.yaml and getting below error :
Bad state: Could not parse the options provided for json_serializable
.
Unrecognized keys: [super-parameters, enhanced-enums]; supported keys: [any_map, checked, constructor, create_factory, create_field_map, create_to_json, disallow_unrecognized_keys, explicit_to_json, field_rename, generic_argument_factories, ignore_unannotated, include_if_null]
my pubsec yaml is
environment:
sdk: ">2.18.0 <3.3.0"
dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^1.0.0 freezed: ^2.3.2 build_runner: ^2.1.8 dropdown_search: ^4.0.1 json_serializable: ^6.5.3
When i remove json_serializable from depndency build passes
Upvotes: 1
Views: 401
Reputation: 96
According to this link https://pub.dev/packages/json_serializable/install
You must add json_serializable
to dependencies
section. You added it to dev_dependencies
in the pubspec.yaml file you shared.
Upvotes: 0