Skip to content

Instantly share code, notes, and snippets.

@jacobaraujo7
Last active July 8, 2019 14:13
Show Gist options
  • Save jacobaraujo7/b6c3ef5ae2b20bd50e8567160f2ae83d to your computer and use it in GitHub Desktop.
Save jacobaraujo7/b6c3ef5ae2b20bd50e8567160f2ae83d to your computer and use it in GitHub Desktop.
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