Skip to content
0:00 / 0:00

#flutter#dart#injectable

Injectable – Flutter & Dart Equivalent to Dagger & Angular Dependency Injection

Reso Coder

114K subscribers • 36 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Reso Coder
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

37K views6 years ago2 recommendations

Mobile developmentSoftware designFlutter and React NativeDesign patterns

Reso Coder explains how to use the Injectable package to automate dependency injection and service location in Flutter.

📗 Written tutorial & starter project 👇👇 resocoder.com/injectable-flutter-di 📧 Get Flutter news 📰 and resources: 👉 flutter.education 👨‍💻 Do you write good code? Find out now! resocoder.com/good-code-quiz Dependency injection is necessary if you're not coding spaghetti 🍝 and you want to keep nice layers of separation in your Flutter app's codebase. The problem is that all of the libraries out there, such as get_it or kiwi, are just service locators with no support or limited support for automating the registration of dependencies. Dagger solves it elegantly for native Android and Angular is also known for its powerful dependency injection framework. Now, we Flutter developers can finally use something similar - the injectable package which is a code generator for get_it. Go to my website for more information, code examples, and articles: ● resocoder.com Follow me on social media: ● instagram.com/resocoder ● facebook.com/resocoder ● twitter.com/resocoder

Why it's here

2 people recommend this

What people say. Recommended as a tutorial on using Injectable alongside GetIt to generate dependency injection code.

u/MRresoMCin r/FlutterDev • Recommends

Injectable – Flutter & Dart Equivalent to Dagger & Angular Dependency Injection

u/Evillordfluffyin r/FlutterDev • Recommends

On “Can anyone tell me why I have to bother myself with DI packages when Provider already have Provider & ProxyProvider?”

I don't fully understand DI myself. YouTube recommended a video to me yesterday by ResoCoder about a package you can use alongside GetIt, which generates DI style classes. It claims to be similar to Dagger which I believe is the Android equivalent for Dependency Injection. Take a look for yourself. link to this video