data_notifier library

Classes

DataNotifier<T extends NotifierState>
A custom notifier that extends ValueNotifier to provide additional functionality. This notifier notifies listeners when the value changes, even if the scheduler phase is not idle. So if the value is set during a frame, it will notify listeners after the frame is complete. This is useful for ensuring that UI updates are made after the current frame is rendered.
NotifierBuilder<T>
A widget that rebuilds itself when the valueNotifier changes.
NotifierState<T, D>
Base class representing the state of a notifier.
NotifierStateError<T, D>
State representing an error in the notifier.
NotifierStateLoaded<T, D>
State representing a successful data load in the notifier.
NotifierStateLoading<T, D>
State representing a loading operation in the notifier.

Typedefs

Listener<T> = void Function(T oldValue, T newValue)
Signature for a function that listens to value changes.
ListenWhen<T> = bool Function(T previous, T current)
Signature for a function that determines whether to call the listener.
ValueWidgetBuilder<T> = Widget Function(BuildContext context, T value, Widget? child)
Signature for a function that builds a widget based on the given value.