Skip to content

Instantly share code, notes, and snippets.

@BrianMwas
Last active August 4, 2021 13:59
Show Gist options
  • Save BrianMwas/c4fee723fc7fc6f20f457b7e00ffb957 to your computer and use it in GitHub Desktop.
Save BrianMwas/c4fee723fc7fc6f20f457b7e00ffb957 to your computer and use it in GitHub Desktop.
class FavoritesBinding extends Bindings {
@override
void dependencies() {
// Lazily inject the dependency and only use the dependency when needed.
Get.lazyPut(() => FavoritesController());
}
}
/*
***Other Code**
*/
GetPage(
page: () => Favorites(),
binding: FavoritesBinding(),
middleware: [
AuthMiddleware(),
]
),
/**
Other code
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment