Json to Dart Model extension can convert JSON objects into Dart data classes. It supports pure Dart class conversion, Flutter-recommended JSON serialization using annotations, Freezed support, Effective Dart:Style, and many more features. Currently, it has more than 135,000 installs.
When generating code with JsonSerializable, the generated toJson function is custom made and doesn't use the JsonSerializable.toJson generated function.
This PR solves this and also introduces some styling to those functions.
Also appends --delete-conflicting-outputs to the flutter pub run build_runner build command in the terminal so it can always be built
When generating code with JsonSerializable, the generated
toJson
function is custom made and doesn't use the JsonSerializable.toJson generated function.This PR solves this and also introduces some styling to those functions.
Also appends
--delete-conflicting-outputs
to theflutter pub run build_runner build
command in the terminal so it can always be built