Implement Dependency Injection in Flutter using inject.dart
Alternatives To Weatherappflutterdependencyinjection
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Getx9,091131119 days ago314March 10, 2023903mitDart
Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
3 years ago7mitDart
Compile-time dependency injection for Dart and Flutter
Jmessage Flutter Plugin167
a year ago58mitJava
JMessage's Flutter plugin (Android & iOS). 极光推送官方支持的 Flutter 插件(Android & iOS)。
Flutter Jetpack99
2 years agootherCSS
Flutter jetpack project help you find better dependency library. Welcome to my website (
Flutter_simple_dependency_injection80733 years ago12April 14, 20211mitDart
A super simple dependency injection implementation for flutter that behaviours like any normal IOC container and does not rely on mirrors
8 months ago16January 09, 20221mitDart
Visualize Dart/Flutter library dependencies in Graphviz dot. Detect dependency cycles.
3 years ago25March 23, 20212mitDart
Flutter plugin to display a popup menu button widget with handsome design and easy to use.
3 years ago11March 04, 20211mitC++
Flutter plugin to display a simple steps indicator line widget
a year ago14August 19, 20204otherJava
A version of flutter based on Tencent live
Pubspec Assist41
2 years ago21mitTypeScript
Easily add dependencies to your Dart / Flutter project.
Alternatives To Weatherappflutterdependencyinjection
Select To Compare

Alternative Project Comparisons


This is a weather app built with Flutter to prove how inject.dart library can be used.

Getting Started

This application integrates multiple advanced concepts for Flutter: fetching data from API, reactive programming, BLoC pattern and dependency injection. If dependency injection is too complicate for you at this moment, open the WeatherAppFlutter repository.

A Medium article explains the Dependency Injection concept from a Flutter developer perspective. It also provides a step-by-step tutorial for building this application with corresponding details of each line of code. For more details, please read the Dependency Injection in Flutter using inject.dart package article.

Basic setup

Open the app in your favorite editor and add the inject.dart library manually:

  • Create a new folder in the project source directory and run the following command from this directory:

git submodule add

  • Run flutter packages get command in your terminal to import the inject.dart library.


As inject works with code generation, we need to use build_runner to generate the required code. Run the following command:

flutter packages pub run build_runner build

Now you can run Flutter build as usual.


alt text

Popular Flutter Projects
Popular Dependency Projects
Popular User Interface Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Dependency Injection