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

Поделиться
HTML-код
  • Опубликовано: 2 июн 2024
  • » 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!🚨
    ruclips.net/user/MarcusNg?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

  •  2 года назад +6

    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 года назад +9

    The best explanation I've ever seen. Thank you so much. especially nested JSON array serialize part is awesome.

  • @Ahmedibrahim356
    @Ahmedibrahim356 2 года назад +2

    I am actually very happy to know that you are active again. You're the best 😘

  • @shirosanchez265
    @shirosanchez265 2 года назад +1

    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.

  • @davidagyakwa288
    @davidagyakwa288 2 года назад +1

    shortest freezed tutorial and the best too 🔥...this video is underrated

  • @jenniferzhang1016
    @jenniferzhang1016 2 года назад +2

    Thanks Marcus! Amazing Tutorial!!

  • @burntleaves1178
    @burntleaves1178 2 года назад +8

    awesome this is going to save me a lot of time, great tutorial!

  • @atlantis_expedition_member4747
    @atlantis_expedition_member4747 2 года назад +5

    This is a wonderful video. Thank you so for this great work.

  • @quangle5701
    @quangle5701 2 года назад +1

    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

  • @jaanaan143
    @jaanaan143 9 месяцев назад

    That was really awesome tutorial to understand freeze kudos man ....

  • @BO-nn9up
    @BO-nn9up 2 года назад +1

    very useful and also calmed tutorial

  • @thelazycomputer99
    @thelazycomputer99 Год назад

    to the point! , thanks!

  • @baiturulukbekov892
    @baiturulukbekov892 2 года назад

    Thank you!

  • @FlutterBaba
    @FlutterBaba 2 года назад +2

    Amazing

  • @roman-ns7is
    @roman-ns7is Год назад

    Awesome!

  • @peacetothehumanity5558
    @peacetothehumanity5558 2 года назад

    Nice video, Thanks.

  • @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

  • @fxvlad
    @fxvlad 2 года назад +1

    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?

  • @unknownman5296
    @unknownman5296 2 года назад

    nice !!! please make more

  • @moammarqaddafi4858
    @moammarqaddafi4858 9 месяцев назад

    Best explanation

  • @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?

  • @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 ?

  • @dedykurniawan4262
    @dedykurniawan4262 2 года назад +1

    Riverpod vs bloc, which one would you choose?

  • @tananga1523
    @tananga1523 2 года назад +2

    When something new on launchclub will be release? Your bloc instagram course was awesome. I need more

  • @ibrahimshehuibrahim918
    @ibrahimshehuibrahim918 2 года назад

    aww thanks

  • @banuaffan
    @banuaffan 2 года назад +4

    Nice tutorial. What extension did you use to highlight error explanation at right side of the error line?

  • @mibi2007
    @mibi2007 2 года назад +2

    Combine with fpdart will make your app and code even faster :)

  • @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

  • @RizkyRamadhan-hu3of
    @RizkyRamadhan-hu3of 2 года назад +1

    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

  • @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..

  • @wonderl4190
    @wonderl4190 2 года назад

    Good ⚡

  • @abdimussa8932
    @abdimussa8932 2 года назад +10

    Thanks for the tutorial, but why do I feel like this is over complicating things than simplifying them

    • @deidyomega
      @deidyomega 2 года назад +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?

  • @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?

  • @UsamaKarim
    @UsamaKarim 2 года назад

    Still didn't get to know how to use Union/Sealed class but get what's the usecase

  • @clei0
    @clei0 2 года назад

    Hi Marcus, How can I get coupon for Launch Club ☺

  • @motasimfuad7762
    @motasimfuad7762 2 года назад

    Are you coming back with the awesome videos!?

  • @davidagyakwa288
    @davidagyakwa288 2 года назад

    how do I use freezed with bloc listeners ....

  • @jigneshji3228
    @jigneshji3228 2 года назад

    pls make a video on responsive ui

  • @dolbysoundsofficial9323
    @dolbysoundsofficial9323 2 года назад

    freezed is best

  • @emadeddineibo1842
    @emadeddineibo1842 2 года назад

    Like for Skyrim reference 👍🏼😂

  • @abdurahmon2827
    @abdurahmon2827 Год назад +1

    Actually confused, just use vs code extension :)

  • @cromuelbarut9859
    @cromuelbarut9859 9 месяцев назад

    too bad, unions got deprecated now in 2023 when Dart 3 was released

  • @luiscarlosdelorenzicantero7379
    @luiscarlosdelorenzicantero7379 2 месяца назад

    please remove the music the next time, it distracts