Flutter Freezed Code Generation - Data Classes, Unions/Sealed Classes, & Bloc Tutorial

  Рет қаралды 40,061

Marcus Ng

Marcus Ng

Күн бұрын

» Flutter courses, writeups, and source code on Launch Club 🧠
drp.li/Iq9Bk
www.launchclub.io/blog/flutte...
» Flutter Job Board 👋
drp.li/T9bLq
Code generation will take your Flutter app development process to the next level. In this video, you'll learn how to use Freezed to generate data classes and unions to greatly reduce the amount of boilerplate code in your apps.
» Resources 📂
Freezed Package: pub.dev/packages/freezed
Equatable: pub.dev/packages/equatable
Dart Data Class Generator: marketplace.visualstudio.com/...
» Remember to like, subscribe, comment, and share this video!🚨
kzbin.info?sub_...
» Socials📱
GitHub: github.com/MarcusNg
Twitter: / marcuslng
» Timestamps 🕒
0:00 Flutter Freezed Code Generation Intro
0:24 Normal User Model
0:39 Equatable
0:51 copyWith
1:14 toJson & fromJson
1:24 VSCode Extension - Dart Data Class Generator
1:58 Freezed Package
3:06 Generate Code
3:26 analysis_options.yaml - Exclude .g.dart and .freezed.dart files
3:34 Freezed toJson & fromJson
4:07 Freezed Custom Methods
4:34 Data Model Relationships
5:10 Serialize Nested Lists of Freezed Objects
5:26 Freezed Unions/Sealed Classes
5:30 Flutter Bloc
6:18 Freezed & Bloc
7:13 Pattern Matching with .when
7:32 Thanks for watching 🙏
» Affiliates 🔥
3D Mockups - LaunchClub.io/rotato
» Music 🎶
[NCS ( / nocopyrightsounds )]
Sky High - Elektronomia ( / elektronomia )
Joakim Karud ( / joakimkarud )
#Flutter #Freezed #CodeGeneration

Пікірлер: 51
@Ahmedibrahim356
@Ahmedibrahim356 2 жыл бұрын
I am actually very happy to know that you are active again. You're the best 😘
2 жыл бұрын
Marcus, you are one of my fav Flutter tutor here in youtube, always quality content, lot's of different and interesting topics. Keep it up!
@beratdinckan5585
@beratdinckan5585 2 жыл бұрын
The best explanation I've ever seen. Thank you so much. especially nested JSON array serialize part is awesome.
@davidagyakwa288
@davidagyakwa288 2 жыл бұрын
shortest freezed tutorial and the best too 🔥...this video is underrated
@shirosanchez265
@shirosanchez265 2 жыл бұрын
Your explanation is awesome! It's so detailed but at the same time so concise. I loved it, you earned a new follower, and ain't easy to get me as one. Thank you so much for such good job.
@quangle5701
@quangle5701 2 жыл бұрын
Excellent! The instructional video is concise with detail explanations. Thank you so much.
@tananga1523
@tananga1523 2 жыл бұрын
Marcus you are the best! Im sad that you are not uploading as often as before
@burntleaves1178
@burntleaves1178 2 жыл бұрын
awesome this is going to save me a lot of time, great tutorial!
@atlantis_expedition_member4747
@atlantis_expedition_member4747 2 жыл бұрын
This is a wonderful video. Thank you so for this great work.
@jenniferzhang1016
@jenniferzhang1016 2 жыл бұрын
Thanks Marcus! Amazing Tutorial!!
@jaanaan143
@jaanaan143 10 ай бұрын
That was really awesome tutorial to understand freeze kudos man ....
@sushilgyawali7880
@sushilgyawali7880 Жыл бұрын
Marcus your explanation are making easy to understand bloc. Please.please make full video on bloc statemanagement .it would be so easy to understand from you. Please
@BO-nn9up
@BO-nn9up 2 жыл бұрын
very useful and also calmed tutorial
@baiturulukbekov892
@baiturulukbekov892 2 жыл бұрын
Thank you!
@FlutterBaba
@FlutterBaba 2 жыл бұрын
Amazing
@roman-ns7is
@roman-ns7is Жыл бұрын
Awesome!
@thelazycomputer99
@thelazycomputer99 Жыл бұрын
to the point! , thanks!
@unknownman5296
@unknownman5296 2 жыл бұрын
nice !!! please make more
@peacetothehumanity5558
@peacetothehumanity5558 2 жыл бұрын
Nice video, Thanks.
@moammarqaddafi4858
@moammarqaddafi4858 11 ай бұрын
Best explanation
@ibrahimshehuibrahim918
@ibrahimshehuibrahim918 2 жыл бұрын
aww thanks
@mibi2007
@mibi2007 2 жыл бұрын
Combine with fpdart will make your app and code even faster :)
@RizkyRamadhan-hu3of
@RizkyRamadhan-hu3of 2 жыл бұрын
Hi Marcus, thank you for the tutorial. I'm beginners and your video helps me a lot. Would you make more tutorial about BLoC in the future? (and please upload it in this channel hehe) Thank you.
@alexanderthill1725
@alexanderthill1725 2 жыл бұрын
Second this. A tutorial dedicated to BLoC would be appreciated very very much
@wonderl4190
@wonderl4190 2 жыл бұрын
Good ⚡
@George-or3uv
@George-or3uv Жыл бұрын
This is the most outstanding of videos. Marcus does the freezer format that you use for classes have the same functionality as Equatable. Can I stop using Equatable and not have to worry about equality while using Freezed?
@tananga1523
@tananga1523 2 жыл бұрын
When something new on launchclub will be release? Your bloc instagram course was awesome. I need more
@fxvlad
@fxvlad 2 жыл бұрын
Bro, I have checked your website and it's really amazing. It's so lightweight and fast in its mobile version, and there is so the nice appearing effect on stuff when you scroll it. Could you pls answer how did you make it so fast and what did you use for that appearing effect?
@Megapows
@Megapows 2 жыл бұрын
Nice tutorial. What extension did you use to highlight error explanation at right side of the error line?
@danialhaikal7500
@danialhaikal7500 2 жыл бұрын
Error lens
@casul-4891
@casul-4891 2 жыл бұрын
Hey, I'm interested on how you make bottom nav bar , do you mind to make one tutorial of it ?
@abdimussa8932
@abdimussa8932 2 жыл бұрын
Thanks for the tutorial, but why do I feel like this is over complicating things than simplifying them
@deidyomega
@deidyomega 2 жыл бұрын
@@MarcusNg I agree. Plus its nice always knowing what your class properties and methods are :D
@sadmansameetonmoy
@sadmansameetonmoy 2 жыл бұрын
@@MarcusNg not just for bloc, for RiverPod, Union classes etc
@chihuy105
@chihuy105 Жыл бұрын
My regret is not choose to use freezed at the first place, after my app scale to have like 400 screen and the boiler code is so much that we are missiple to read it
@TYNEPUNK
@TYNEPUNK 2 жыл бұрын
thanks, what to do if the freezed file just isnt generated?
@dedykurniawan4262
@dedykurniawan4262 2 жыл бұрын
Riverpod vs bloc, which one would you choose?
@biplabdutta
@biplabdutta 2 жыл бұрын
Why were the factory constructors in the counter_state.dart private? I thought just like in the counter_event.dart, they needed to be public..
@AbdulrahimKlisI
@AbdulrahimKlisI 2 жыл бұрын
hey hey is there any link for this repository? I like how it works so wish to implement maybe chopper or retrofit on this architecture
@jigneshji3228
@jigneshji3228 2 жыл бұрын
pls make a video on responsive ui
@UsamaKarim
@UsamaKarim 2 жыл бұрын
Still didn't get to know how to use Union/Sealed class but get what's the usecase
@motasimfuad7762
@motasimfuad7762 2 жыл бұрын
Are you coming back with the awesome videos!?
@bowenjin7163
@bowenjin7163 Жыл бұрын
How do I become a LaunchClub member? When I try to join it asks for my email and name and in the email I can subscribe, but I can't find how to create an account to access the content?
@davidagyakwa288
@davidagyakwa288 2 жыл бұрын
how do I use freezed with bloc listeners ....
@dolbysoundsofficial9323
@dolbysoundsofficial9323 2 жыл бұрын
freezed is best
@clei0
@clei0 2 жыл бұрын
Hi Marcus, How can I get coupon for Launch Club ☺
@emadeddineibo1842
@emadeddineibo1842 2 жыл бұрын
Like for Skyrim reference 👍🏼😂
@abdurahmon2827
@abdurahmon2827 Жыл бұрын
Actually confused, just use vs code extension :)
@cromuelbarut9859
@cromuelbarut9859 10 ай бұрын
too bad, unions got deprecated now in 2023 when Dart 3 was released
@luiscarlosdelorenzicantero7379
@luiscarlosdelorenzicantero7379 4 ай бұрын
please remove the music the next time, it distracts
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН
Happy 4th of July 😂
00:12
Pink Shirt Girl
Рет қаралды 56 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 14 МЛН
Flutter Freezed | Code Generation
7:29
Flutter Guys
Рет қаралды 3,4 М.
Why bloc is the best of state management in Flutter
53:55
dbestech
Рет қаралды 2,5 М.
35 Flutter Tips That Will Change Your Life
10:53
Flutter Mapp
Рет қаралды 295 М.
Best 30 Flutter Widgets, Packages & Tips
5:11
Flutter Mapp
Рет қаралды 118 М.
What is happening with Flutter
3:41
typecraft
Рет қаралды 141 М.
Avoid hundreds of lines of Flutter boilerplate with the Freezed plugin
12:51
Flutter:Dart copyWith method
11:35
dbestech
Рет қаралды 4,1 М.
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН