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

Published: 26 August 2024
on channel: Tyler Codes
489
19

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:
https://github.com/tylersavery/freeze...


Watch video Data classes, cloning, and (de)serialization with Freezed in Dart and/or Flutter online without registration, duration hours minute second in high quality. This video was added by user Tyler Codes 26 August 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 48 once and liked it 1 people.