Skip to content

Instantly share code, notes, and snippets.

@AseemWangoo
Created September 6, 2022 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AseemWangoo/3595995ca912dd060a561b9c558279a6 to your computer and use it in GitHub Desktop.
Save AseemWangoo/3595995ca912dd060a561b9c558279a6 to your computer and use it in GitHub Desktop.
locator
final GetIt locator = GetIt.instance;
void setupLocator() {
locator.registerFactory<HomeRepository>(() => HomeRepoImpl());
// Alternatively you could write it
GetIt.I.registerFactory<HomeRepository>(HomeRepoImpl());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment