ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Generics in Dart - Learn How to Write Highly Reusable Code with Generics in Dart

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ส.ค. 2024
  • This video is part of the Dart Crash Course playlist on TH-cam. See the entire playlist here: • Dart Crash Course
    Welcome to Dart Crash Course. Dart is a beautiful and modern programming language that can be used both for frontend and backend applications. In this course, we will focus on Dart as a programming language without blending in any other frameworks such as Flutter.
    In this video we will have a look at writing highly reusable code using generics in Dart.
    Timestamps:
    00:00:00 - Intro
    00:01:07 - Generic Integer or Double
    00:14:49 - Type Matching
    00:19:10 - Constrained Generic Type Definitions
    00:26:54 - Unconstrained Generic Type Definitions
    00:30:53 - Specializing Generic Type Definitions
    00:33:03 - Generic Mixins and Specialized Mixin Type Definitions
    00:36:22 - Generic Classes with Generic Extensions
    00:43:04 - Generic Sorting with Comparable
    00:47:24 - Handling Lack of Common Ancestors
    00:54:28 - Generic Extension on Any Data Type
    01:01:21 - Generic Function Pointers
    01:05:04 - Generic Class Properties
    Join the discord group if you have any questions: / discord
    The GitHub repository for this course can be found here: github.com/van...
    Join my TH-cam channel to support me: / vandadnp
    Also please follow me on Twitter and LinkedIn to stay up to date:
    / vandadnp
    / vandadnp

ความคิดเห็น • 26

  • @awaishaleem6596
    @awaishaleem6596 3 วันที่ผ่านมา +1

    Amazing video! Mr. Vanddd's explanation of Dart Generics was spot on. I've been avoiding this topic for a while, but his clear and concise teaching made it understandable. Definitely recommend this video to anyone struggling with Generics!

  • @veselinlazarevic916
    @veselinlazarevic916 ปีที่แล้ว +6

    I’m preparing for sleep and watching your last video about extensions, and now get notification about new video 😂 Thanks for every video 🙏

    • @VandadNP
      @VandadNP  ปีที่แล้ว +3

      Haha, sleep well and you can continue tomorrow 😊

  • @osmanndemiroz
    @osmanndemiroz 7 หลายเดือนก่อน +2

    Thanks for all !

  • @blueice1364
    @blueice1364 ปีที่แล้ว +4

    Thank you!
    This is the best explanation of Generics in Dart I've found so far.

    • @VandadNP
      @VandadNP  ปีที่แล้ว +3

      Good to hear. Thank you 😊

  • @ashiquealimughal7684
    @ashiquealimughal7684 ปีที่แล้ว +1

    Thank you for this amazing tutorial on Generics in Dart! Your examples were easy to understand and follow along with. I appreciate how you broke down the concepts into simple terms and provided clear explanations. Keep up the great work! 🙌

  • @inkedoo
    @inkedoo 3 หลายเดือนก่อน

    Thank U too much , this video is very helpful and direct to the point

  • @CYCLONE_2XL
    @CYCLONE_2XL 5 หลายเดือนก่อน +1

    Amazing !

  • @mattiasnkonjo940
    @mattiasnkonjo940 ปีที่แล้ว +2

    Finally Generics. Thanks brother.

    • @VandadNP
      @VandadNP  ปีที่แล้ว +1

      You bet! 😊

  • @Vindolin
    @Vindolin ปีที่แล้ว +1

    Thanks for the fantastic course! Helped me a lot.

  • @omoyajowotemidayo5382
    @omoyajowotemidayo5382 ปีที่แล้ว +2

    Thank you so much for these series 🙏

    • @VandadNP
      @VandadNP  ปีที่แล้ว +1

      You’re very welcome 😉

  • @ziadahmed6807
    @ziadahmed6807 ปีที่แล้ว +2

    I was scared to click and watch the video 😅. But after watching a bit of it, I’m really glad that I took that decision, this is the second time you amaze me after watching your great BLoC course.
    Thanks for your great efforts 🙏.

    • @VandadNP
      @VandadNP  ปีที่แล้ว +1

      Great job and I'm glad you gave generics a chance 🤗

  • @miracle_blue
    @miracle_blue ปีที่แล้ว +1

    thanks

  • @webcomcafe
    @webcomcafe ปีที่แล้ว +3

    Hi man. I would like know if you will teach about advanced topics like Asynchronous Programing, Stream, Isolates, Zones e etc. These topics are very complicated and i have too difficult.
    Thanks from Brazil.

    • @VandadNP
      @VandadNP  ปีที่แล้ว +1

      Yes, next chapter of the Dart Crash Course is about async programming actually and a separate chapter will follow about isolates.

  • @faezansar5417
    @faezansar5417 11 หลายเดือนก่อน

    in eg 9 toInt is a built in function so in cases of just int and double,built in one is being called,to call our method wrap it like this ToInt(1).toInt ,also remove brackets from [this as int] in the extension for it to work properly on non iterable values

  • @mdataullah5489
    @mdataullah5489 ปีที่แล้ว

    00:43:08 Could you explain in detail how Generic Sorting work with Comparable, please?

  • @g_a_m_b_e_t_t_o_r8920
    @g_a_m_b_e_t_t_o_r8920 ปีที่แล้ว

    Thank you very much for this wonderful course! I have one question why when I point to (Person p) => p.age the type personName is Object personName and not int personName?)

  • @kingpinkent
    @kingpinkent ปีที่แล้ว

    Is it possible to use a generic to create a new instance of that generic? Let's say I have a User class that I pass as a generic to a method. Can I in that method create an instance of User without knowing it is the User class? Like: myMethod(dynamic data) => T(data). And then: myMethod(data). I know the way I wrote it is not possible, but is there another way?

  • @nemanjalugi
    @nemanjalugi ปีที่แล้ว

    Great video! Can you show us what VS code extensions you are using?

  • @hungquy2949
    @hungquy2949 ปีที่แล้ว +1

    what a great explanation and example 🤌🤌
    thank you for your effort 👏👏