flutter_state_management library
Classes
-
Event<
StateType, ErrorType> -
Failed<
StateType, ErrorType> -
Idle<
StateType> - KeyValueStore
-
Loaded<
StateType> -
Loading<
StateType> -
PersistedStateNotifier<
StateType, ErrorType> -
Resolver<
T extends StateNotifier, R> - Creates and caches notifiers instances on the fly
- RStatefulWidget
- RStatelessWidget
-
StateNotifier<
StateType, ErrorType> -
StateNotifierBuilder<
StateType, ErrorType>
Extensions
-
DataEventX
on Event<
StateType, ErrorType> - ListenableX on T
-
StateNotifierExtensions
on StateNotifier<
StateType, ErrorType>
Typedefs
-
ArgNotifierBuilder<
T extends StateNotifier, R> = T Function(R? arg) -
Takes context and
arg
, returns a StateNotifier -
FailureBuilder<
ErrorType> = Widget Function(BuildContext context, ErrorType error) - Used when StateNotifier.state is a Failed and an error widget should be built to show that error
-
GlobalFailureBuilder<
ErrorType> = Widget Function(BuildContext context, ErrorType error, Widget? lastStateBuild) -
Used when
onFailure
is not provided to a StateNotifierBuilder - GlobalLoadingBuilder = Widget Function(BuildContext context, Widget? lastStateBuild)
- This function takes a BuildContext and a Widget and returns a widget
-
LoadedBuilder<
T> = Widget Function(BuildContext context, T data) - Used when notifier updates its state and widget needs to rebuild with new data
-
LoadingBuilder<
T> = Widget Function(BuildContext context, T? data) - Used when StateNotifier.state is a Loading and widget needs to rebuild with busy widget (e.g. progress indicator)
-
Selector<
T extends Listenable> = dynamic Function(T model)