Dependency Injection in Flutter - You HAVE to Use it !
Vložit
- čas přidán 27. 07. 2024
- 📄Dependency Injection (DI) is a design pattern used to implement Inversion of Control. It allows the creation of dependent objects outside of a class and provides those objects to a class through different ways. Using DI, we move the creation and binding of the dependent objects outside of the class that depends on them. This brings a higher level of flexibility, decoupling, and easier testing.
🌐 Telegram Community
🔗 t.me/flutterguysgp
📁Source Code
🔗 github.com/Fabrice-Fabio/depe...
🌐 Social Media
🔗 Linkedin:
/ fabrice-sumsa-9b1133151
/ mahdinazmi
🔗 GitHub:
github.com/Fabrice-Fabio
github.com/mahdinazmi
⏳ TIMESTAMPS :
00:00 Intro
00:22 Join Telegram Community
00:40 Why DI With GetIt?
01:04 Without DI
02:04 Ways To Registering Instances
02:49 Register Singleton
05:36 Register Lazy Singleton
06:33 Register Factory
#flutter #fluttertutorial #fluttercourse #flutterwidgets - Věda a technologie
Great video! Thanks for the explanation, it really helped me!
Great video Arkadash :)
I love every your contents. Your contents is somewhat different than other flutter related youtuber. YOU NAILED IT!
Wow, thank you!
Well done! Thank you!
thank's for content and subtitle!
Great video!
Very great!😃
Explained very well🎉
Great video as usual 💜
Please make videos on state management in real & complex projects.
Thanks
Yes , Sure ...
We recently started bloc course
That was helpful thanks.
Glad it helped
Wow, understood DI from just a 7 minute video!
Glad it was helpful!
❤❤❤
easy to understand thank you I hope you to show video using injectable plz
I will try my best
Hi, I'm trying to understand how/when/why to use "injectable" package with get_it package for DI. Injectable is supposedly useful for boilerplate and other useful features like modules. I would ask that you could make an example application with just get_it, and then transform that same application into another "simplified" one with the help of the "injectable" package, in such a way that one could see how useful said package could be, or under what circumstances it is. I currently find it difficult to understand its use, and the current tutorials found on the Web do not provide much help. "injectable" has a notation called "module" that seems useful in a "features" approach but without comparing how it would be presented with just "get_it" you don't fully understand the mechanism behind it.
nice
Thanks
How about prrovider, can provider use decency injection
Thanks for this video it will be great if you add injectable support as well
We will
Thank you 🌹. I have a question. Is it possible to register a service with input argument? If yes how we can pass argument to service class inside the app programmatically?
Yes you can pass get it instance instead of argument like this : sl()
Great video! Thanks for the informative content, sir.
One question! If the app is using Riverpod, would you consider using `get-it` as dependency injection?
Yes , It doesn't matter what state management you use...
@@flutterguys Thanks for the quick response!
Yes, the video is nice, but I never recommend using this as state management. Use it as Dependency injection solution only, so you can make our app loosely coupled class to class.
Isn't this similar to provider?
kindly improve the ACCENT and AUDIO
Fully agree
injectable please
great