yx_state_flutter library
Flutter widgets for yx_state.
Classes
-
StateBuilder<
S> -
A widget that builds itself based on the latest snapshot of interaction with a
StateReadable. -
StateConsumer<
S> - A widget that combines StateBuilder and StateListener.
-
StateListener<
S> -
A widget that listens to a
StateReadableand calls a listener when the state changes. -
StateSelector<
S, U> -
A widget that builds itself based on a part of the state from a
StateReadable.
Typedefs
-
StateBuilderCondition<
S> = bool Function(S previous, S current) - Function that determines when a widget should rebuild.
-
StateListenerCondition<
S> = bool Function(S previous, S current) - Function that determines when a listener should be called.
-
StateWidgetBuilder<
S> = Widget Function(BuildContext context, S state, Widget? child) - Builder function that builds a widget based on the current state.
-
StateWidgetListener<
S> = void Function(BuildContext context, S state) - Listener function that is called when the state changes.
-
StateWidgetSelector<
S, T> = T Function(S state) - Function that extracts a value from the state.