model_from_json 1.0.0 copy "model_from_json: ^1.0.0" to clipboard
model_from_json: ^1.0.0 copied to clipboard

A Dart CLI tool that generates Equatable-ready Dart model classes directly from JSON files, with support for nested objects, lists, and automatic fromJson/toJson methods.

1.0.0 — Initial Release (2026-02-03) #

🎉 First public release of model_from_json.

Features #

  • ✅ Generate Dart model classes automatically from JSON files
  • ✅ Supports primitive field inference:
    • String, int, double, bool
  • ✅ Supports lists of primitives:
    • List<String>, List<int>, List<bool>, etc.
  • ✅ Recursive nested model generation:
    • Generates child models automatically for nested objects
  • ✅ Supports lists of nested objects:
    • Generates List<ChildModel> correctly
  • ✅ Generates complete model boilerplate:
    • fromJson()
    • toJson() (including nested .toJson() support)
    • Equatable props override
  • ✅ Multi-file output support:
    • Outputs one Dart file per model
  • ✅ Optional output folder support with --out
  • ✅ Interactive CLI mode when run with no arguments
  • ✅ Prettified CLI UX:
    • Banner, prompts, summaries
1
likes
150
points
165
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart CLI tool that generates Equatable-ready Dart model classes directly from JSON files, with support for nested objects, lists, and automatic fromJson/toJson methods.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

equatable

More

Packages that depend on model_from_json