Freezed
Code generation for immutable classes that has a simple syntax/API
...It generates constructors, equality, hash codes, toString, and copyWith functionality from concise class declarations. Union types can represent multiple states through separate constructors while retaining exhaustive type-safe handling. JSON serialization integrates with json_serializable, including support for generic argument factories. Project-wide or per-model options can enable or disable generated behaviors such as equality and copying. Freezed works with Dart and Flutter through the standard build_runner workflow. It is especially useful for application state, API models, and strongly typed domain objects.