Dependency Injection in Flutter - You HAVE to Use it !

preview_player
Показать описание
📄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

📁Source Code

🌐 Social Media
🔗 Linkedin:
🔗 GitHub:

⏳ 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
Рекомендации по теме
Комментарии
Автор

Great video! Thanks for the explanation, it really helped me!

leonardo_ruizz
Автор

I love every your contents. Your contents is somewhat different than other flutter related youtuber. YOU NAILED IT!

minseokjeong
Автор

Great video as usual 💜
Please make videos on state management in real & complex projects.
Thanks

hiwa_sh
Автор

thank's for content and subtitle!

bendzbodoi
Автор

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.

billiardoxx
Автор

Wow, understood DI from just a 7 minute video!

androidterminal
Автор

How about prrovider, can provider use decency injection

trapeye
Автор

easy to understand thank you I hope you to show video using injectable plz

edward
Автор

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?

hosseinvejdani
Автор

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?

KyoYamamoto-rcjp
Автор

Thanks for this video it will be great if you add injectable support as well

im_swapnil_musale
Автор

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.

salsichalivre