Data classes, cloning, and (de)serialization with Freezed in Dart and/or Flutter

preview_player
Показать описание
Let’s take a deep dive into the world of freezed, a powerful data class/serialization generator. We’ll cover the most common use cases I use in my daily app development.

If you like this video, comment to request a follow-up video in which we can discuss generics and other advanced topics.

Chapters

00:00 - What is Freezed?
01:24 - Sandbox Walkthrough
05:21 - Installing Dependencies
06:32 - Initial Car Model
10:05 - Generate (build) Code
12:52 - Serializing Data
14:21 - Running Our Code
15:25 - Printing Details
17:19 - Booleans & Nullable Data
19:40 - Defaults
21:15 - JsonKey(name: ...)
22:54 - Analysis Options for Annotation
24:32 - Enums with JsonKey(toJson/fromJson)
30:32 - Tyler makes a Typo
32:10 - JsonKey(name: ...) again
33:38: - Custom Getters
35:07: - Clientside Properties
36:42 - copyWith(...)
38:10 - copyWith(...) Utility Methods
40:24 - Closing Remarks & What's Next

The Code:
Рекомендации по теме
Комментарии
Автор

Best explanation of "Freezed" that I have seen. Thanks

photiosloupis
Автор

Great video to catch up the basic usage of freezed. Thanks for uploading the video !

HQHAN
Автор

I had struggled a lot with freezed once found a nice article regarding it but it was a bit too over-engineered, thanks to this tutorial !!!

thelocaldev
Автор

This is the best video on freezed I've seen, having watched quite a few already. Looking forward to your part two!

luken
Автор

0:20 Can you tell a little bit more about this "riverpod" implementation of problem which freezed solves?

tananga_studio
Автор

i used to hate codegen, but running it with watch flag doesn't seem so bad.

abdushakoor