google / json_serializable.dart

Generates utilities to aid in serializing to/from JSON.
https://pub.dev/packages/json_serializable
BSD 3-Clause "New" or "Revised" License
1.55k stars 396 forks source link

Add `ignore_for_file: non_constants_identifier_names` to `g.dart` file #1287

Closed bambinoua closed 1 year ago

bambinoua commented 1 year ago

It would be good to add // ignore_for_file: non_constants_identifier_names to generate g.dart file to avoid this warning message

The variable name `_$$_UserSettingsFromJson` isn't a lowerCamelCase identifier.
Try to change the name to follow the lowerCamelCase style.
kevmoo commented 1 year ago

See https://github.com/dart-lang/source_gen/tree/master/source_gen#ignore_for_file