JSON input
Paste JSON, optionally name the root type, then generate.
Your Dart class code will appear here.
Convert JSON into Dart model classes for Flutter. Final fields, named constructors, required and nullable modifiers are inferred from your data.
Paste JSON, optionally name the root type, then generate.
Your Dart class code will appear here.
Dart's null safety means every field must declare whether it can be null. The generator answers that from your sample: consistently present fields become required, the rest become nullable, and nested objects become nested classes.
Flutter apps live on JSON APIs. Generating the model layer from a real response removes the most tedious part of wiring up a new endpoint, leaving you to focus on the UI.