# Freezed

Freezed is a Dart code generator that produces immutable data classes, tagged unions and cloning support, so a developer only has to write the definition of a model instead of its boilerplate.

Freezed is a code generator for Dart data classes, tagged unions, nested classes and cloning. Defining a model by hand normally means writing a constructor and properties, overriding toString, equality and hashCode, implementing a copyWith method, and handling serialization; Freezed generates all of this from a short model definition.

It supports primary constructors, added getters and methods on generated models, asserts, default values, extending and mixing in other classes, mutable as well as immutable classes, JSON serialization through fromJson and toJson, and pattern matching over union types.

It is used with the build_runner code generation setup in a Dart or Flutter project, and has editor extensions for VS Code and IntelliJ or Android Studio.

Website: https://pub.dev/packages/freezed
