Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Injectable Example

This is an example of how to implement Dependency Injection in your own Flutter project.

Requirements

How to Add Dependencies

To add a dependency, all you need to do is call this code below:

@InjectableInit
void configureDependencies() => getIt.init();  

To handle the generation file run this command on your terminal

flutter pub run build_runner build --delete-conflicting-outputs

It will generates a new file 'injection.config.dart', which will include all dependencies for all use cases.

and on your main func

void main() {
  configureDependencies(); 
  ........

About

This is an example of how to implement Dependency Injection in your own Flutter project.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages