Last active
July 8, 2019 14:13
-
-
Save jacobaraujo7/b6c3ef5ae2b20bd50e8567160f2ae83d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HomeModule extends ModuleWidget { | |
//Inject the blocs | |
@override | |
List<Bloc<BlocBase>> get blocs => [ | |
Bloc((i) => HomeBloc())), | |
]; | |
//Inject the dependencies | |
@override | |
List<Dependency> get dependencies => []; | |
//main widget | |
@override | |
Widget get view => HomeWidget(); | |
//shortcut to pick up dependency injections from this module | |
static Inject get to => Inject<HomeModule>.of(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment