ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
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
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!
I’m preparing for sleep and watching your last video about extensions, and now get notification about new video 😂 Thanks for every video 🙏
Haha, sleep well and you can continue tomorrow 😊
Thanks for all !
Thank you!
This is the best explanation of Generics in Dart I've found so far.
Good to hear. Thank you 😊
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! 🙌
Thank U too much , this video is very helpful and direct to the point
Amazing !
Finally Generics. Thanks brother.
You bet! 😊
Thanks for the fantastic course! Helped me a lot.
Thank you so much for these series 🙏
You’re very welcome 😉
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 🙏.
Great job and I'm glad you gave generics a chance 🤗
thanks
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.
Yes, next chapter of the Dart Crash Course is about async programming actually and a separate chapter will follow about isolates.
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
00:43:08 Could you explain in detail how Generic Sorting work with Comparable, please?
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?)
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?
Great video! Can you show us what VS code extensions you are using?
what a great explanation and example 🤌🤌
thank you for your effort 👏👏