hiranthaR / Json-to-Dart-Model

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.
https://marketplace.visualstudio.com/items?itemName=hirantha.json-to-dart
MIT License
93 stars 17 forks source link

Support Composition #93

Open globalwebforce opened 2 years ago

globalwebforce commented 2 years ago

Is there an existing issue for this?

Current Behavior

Is there any support on auto-generating composition? there are some cases that we want a Class to inherit another Class, but as of this time inheritance is not supported by freezed package but there's an alternative called composition. Any insight about this one. Thank you.

https://github.com/rrousselGit/freezed/issues/464

Expected Behavior

No response

Steps To Reproduce

No response

Version

No response

Relevant JSON syntax

No response

Anything else?

No response

iamarnas commented 2 years ago

@globalwebforce Hi 👋 If I understand you correctly. Composition should work with this generator. But the rest what is not supported by Freezed it not possible generate. This generator generate only data class from the given json string and the rest generates by Freezed.