# Freezed

> Code generation for immutable data classes and unions in Dart

Source: https://talira.ai/catalog/freezed-pym7c99a
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / value equality](https://talira.ai/categories/libraries/value-equality), [languages / dart](https://talira.ai/categories/languages/dart)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Remi Rousselet](https://talira.ai/orgs/remi-rousselet.md)

Freezed is a code generator for Dart and Flutter that writes the boilerplate of data classes for you: from a short class definition it generates the constructor and properties, `toString`, `==` and `hashCode`, a deep `copyWith`, and JSON serialization through json_serializable. It also supports union types (sealed classes) with pattern matching, default values, asserts and mutable classes when you ask for them. You add `freezed` and `freezed_annotation` to a project and run build_runner. It's by Remi Rousselet, under the MIT licence.

## Links

- GitHub: https://github.com/rrousselGit/freezed
- Docs: https://pub.dev/documentation/freezed/latest/

## Problems it solves

- stop writing copyWith, == and hashCode by hand for my Flutter model classes
- immutable data classes in Dart with JSON serialization
- sealed union types for app state in Flutter

## Features

- generates ==, hashCode, toString and copyWith for Dart classes
- union types (sealed classes) with pattern matching
- JSON serialization through json_serializable
- deep copy with nested copyWith
- lint package freezed_lint

## Trust

Overall: 0.59 out of 1.
Signals: maintenance 0.83, adoption 0.67, momentum 0.43, community 0.83, backing 0.30, extensibility 0.00.

- last commit 6 days ago
- 34 commits in the last 90 days
- 2.2k GitHub stars
- 121 contributors
- accepts sponsorship (Github)
- backed by Remi Rousselet

## Alternatives

- [equatable](https://talira.ai/catalog/equatable-nggpq8v5.md): A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode
- [built_value](https://talira.ai/catalog/built-value-gbwhwcf6.md): Immutable value types, enum classes and JSON serialization for Dart, by code generation

## Sources

[^1]: https://github.com/rrousselGit/freezed/blob/master/packages/freezed/LICENSE (checked 26 Nov 2026)
