---
title: "Discussion on \"Freezed, or even more code generation\" | Hashnode"
description: "Discussion on \"Freezed, or even more code generation\". Data classes, unions, and fewer lines of code"
url: "https://hashnode.com/posts/freezed/61fc782cfd8b083e57289947"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Freezed, or even more code generation](https://marcossevilla.dev/freezed?utm_source=hashnode&utm_medium=feed)

Data classes, unions, and fewer lines of code

Jan 25, 2021 · 7 min read · marcossevilla.dev  
Updated Feb 7, 2022  
Read the article

-   [#code](https://hashnode.com/tag/code)
-   [#generators](https://hashnode.com/tag/generators)
-   [#dart](https://hashnode.com/tag/dart)

## Written by

[Marcos Sevilla](https://hashnode.com/@marcossevilla)

@marcossevilla · Barcelona, Spain

  
[View profile](https://hashnode.com/@marcossevilla)

Senior Engineer at Very Good Ventures

I'm a Senior Engineer at Very Good Ventures, a Flutter development consultancy. I build Flutter apps for large-scale companies and do open source work for popular Dart and Flutter packages such as Very Good CLI and Dart Frog.

## Responses 1

Markdown supported · ⌘↵ to post

[sarfaraz ahmed](https://hashnode.com/@findsarfaraz)

[Aug 21, 2022](https://hashnode.com/posts/freezed/61fc782cfd8b083e57289947/comment/6301dc83428d2725de1a7d99)

how to achieve something like this using freezed

class Todo { Todo( this.description, { this.completed = false, String? id, }) : id = id ?? \_uuid.v4();

final String id; final String description; final bool completed; }
