classy 0.2.1
classy: ^0.2.1 copied to clipboard
This is a package to simplify your dart code, specially classes and make your code more Classy and Cleaner without the normal boilerplate

This is a package to simplify your dart code, specially classes and make your code more Classy and Elegant without the normal boilerplate
✨ Features #
😎 @data calls the @constructor, @toJson, @fromJson and @toString to generate the complete class for you.
🏗️ @constructor it generates a constructor, and you can choose if you want NamedConstructor or PositionConstructor.
⬇️ @fromJson to instantiate the class from a json, that normally come from a server.
⬆️ @toJson to convert the class instance into a JSON map, which can be sent to a server or used elsewhere in your application.
📜 @toString for a readable string representation of the class.
🚀 How to Run? #
-
Add
package:classyto yourpubspec.yaml- Run Command
dart pub add classy- In
pubspec.yamlfile
dependencies: classy: any -
Add the following code into your
analysis_options.yamlanalyzer: enable-experiment: - macros -
When you're gonna run the project:
dart run --enable-experiment=macros path/main.dart
