flutter_redux
library
Classes
StoreBuilder <S >
Build a Widget by passing the Store
directly to the build function.
StoreConnector <S , ViewModel >
Build a widget based on the state of the Store
.
StoreProvider <S >
Provides a Redux Store
to all descendants of this Widget. This should
generally be a root widget in your App. Connect to the Store provided
by this Widget using a StoreConnector or StoreBuilder .
Typedefs
IgnoreChangeTest <S >
= bool Function(S state )
A test of whether or not your converter
function should run in response
to a State change. For advanced use only.
OnDidChangeCallback <ViewModel >
= void Function(ViewModel? previousViewModel , ViewModel viewModel )
A function that will be run on State change, after the build method.
OnDisposeCallback <S >
= void Function(Store<S > store )
A function that will be run when the StoreConnector is removed from the
Widget Tree.
OnInitCallback <S >
= void Function(Store<S > store )
A function that will be run when the StoreConnector is initialized (using
the State.initState method). This can be useful for dispatching actions
that fetch data for your Widget when it is first displayed.
OnInitialBuildCallback <ViewModel >
= void Function(ViewModel viewModel )
A function that will be run after the Widget is built the first time.
OnWillChangeCallback <ViewModel >
= void Function(ViewModel? previousViewModel , ViewModel newViewModel )
A function that will be run on State change, before the build method.
StoreConverter <S , ViewModel >
= ViewModel Function(Store<S > store )
Convert the entire Store
into a ViewModel
. The ViewModel
will be used
to build a Widget using the ViewModelBuilder .
ViewModelBuilder <ViewModel >
= Widget Function(BuildContext context , ViewModel vm )
Build a Widget using the BuildContext and ViewModel
. The ViewModel
is
derived from the Store
using a StoreConverter .
Exceptions / Errors
ConverterError
If the StoreConnector throws an error,
StoreProviderError <S >
If the StoreProvider.of method fails, this error will be thrown.