dart_board_locator 0.9.3 dart_board_locator: ^0.9.3 copied to clipboard
Redux extensions for Dart Board, exposes flutter_redux and dart redux, and wraps them in a decoration based API, allowing features their own Redux stores
dart_board_locator #
Service/State Locator Service
What is a service locator #
Simply put, it locates services. And if it can't do that it builds them.
You provide factories in the form of AppDecorations.
You can then use locate
When to use it? #
When tree heirarchy of your services don't matter (i.e. they are "globals").
It doesn't impose anything.
A convenient way of using it would be to pair it with ChangeNotifer.builder()
extension method to convert state into widgets.
E.g.
locate<YourChangeNotifier>().builder((ctx, value)=>Text(value.someData))
Usage #
Provide factories to construct your objects. Find with Locate
They will be lazily loaded and initialized as requested.
See Example for Simple Usage