Last updated:
0 purchases
model code generator
Model Code Generator for Flutter #
Model Code Generator is a simple command for make a model in flutter. it's very easy to use.
What It does? #
✅ Create a model file based on your json.
✅ Include fromJson and toJson function.
✅ No internet connection needed.
How to Use? #
Add Model Code Generator to your pubspec.yaml in dev_dependencies: section.
dev_dependencies:
model_code_generator: ^1.0.1
copied to clipboard
Update dependencies
flutter pub get
copied to clipboard
Run this command to create model file.
flutter pub run model_code_generator <yourclassname>
copied to clipboard
Where <yourclassname> is the class and file name that you want for your model. replace it with any name you want.
Example:
flutter pub run model_code_generator user
copied to clipboard
Then input/paste the json.
Example JSON:
{
"name" : "John Doe",
"Age" : 25,
"isHandsome" : true
}
copied to clipboard
Press Enter twice to finish.
Contact #
Email : [email protected]
LinkedIn : Doni Nugroho
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.