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.
Files stop generating when some dart file is duplicated
The models stop being generated when a dart model file is already present in the models/ folder because of an error thrown that stopped the iteration. This approach only shows an error message and continues the iteration without stopping the files from being generated.
Field names are bad formatted in the equatable related props override
This one's on me. I didn't fixed the names for the props list generated for the equatable override. This PR fixes it.
Cannot read type of undefined
I think this can fully or partially fix #3. I'm not sure but I'd like some of your help because you know better the tool and understand what behaviour could present the fix that I propose. Check the 113 and 121 lines of src/helper.ts. I'm just wrapping the equality check in the null safe operator so if the astNode is null, the function returns the node, that is null, I think.
I'd like some retro on this so if you can spare some time, It'd be really helpful.
Introduces some minor fixes to the extension
Field names are bad formatted in the equatable related
props
override This one's on me. I didn't fixed the names for theprops
list generated for the equatable override. This PR fixes it.Cannot read type of undefined I think this can fully or partially fix #3. I'm not sure but I'd like some of your help because you know better the tool and understand what behaviour could present the fix that I propose. Check the 113 and 121 lines of src/helper.ts. I'm just wrapping the equality check in the null safe operator so if the astNode is null, the function returns the node, that is
null
, I think. I'd like some retro on this so if you can spare some time, It'd be really helpful.