syncx library
SyncX: A lightweight, developer-friendly state management solution for Flutter.
SyncX provides notifiers, builders, and consumers for reactive UI updates with minimal boilerplate. Inspired by bloc, provider, and riverpod, it offers a familiar API for developers migrating from those solutions.
Features:
- Notifier-based state management
- Async and error state handling
- Builder and listener widgets for UI updates and side effects
- Provider integration and easy registration
See the package README and example for usage details.
Classes
-
AsyncNotifier<
S> -
A concrete implementation of
BaseNotifier
for managing asynchronous state using AsyncState. -
AsyncNotifierBuilder<
N extends BaseNotifier< BaseAsyncState< , S extends Object?>S> > -
A widget that rebuilds when the BaseAsyncState of the provided
BaseNotifier
changes. -
AsyncNotifierConsumer<
N extends BaseNotifier< BaseAsyncState< , S extends Object?>S> > -
A widget that rebuilds and listens when the BaseAsyncState of the provided
BaseNotifier
changes. -
AsyncNotifierListener<
N extends BaseNotifier< BaseAsyncState< , S extends Object?>S> > -
A widget that listens for changes in the BaseAsyncState of the provided
BaseNotifier
and triggers side effects. -
AsyncState<
S extends Object?> - Represents the state of an asynchronous operation, encapsulating loading, data, and error states.
-
BaseAsyncState<
S extends Object?> - Abstract base class for representing asynchronous state in a notifier or state management flow.
- ErrorState
- Represents error information for an asynchronous operation.
-
Notifier<
S> -
A concrete implementation of
BaseNotifier
that provides a default setState behavior. -
NotifierBuilder<
N extends BaseNotifier< S> , S extends Object?> -
A widget that rebuilds when the state of the provided
BaseNotifier
changes. -
NotifierConsumer<
N extends BaseNotifier< S> , S extends Object?> -
A widget that both rebuilds and listens to state changes from a
BaseNotifier
. -
NotifierListener<
N extends BaseNotifier< S> , S extends Object?> -
A widget that listens to state changes from a
BaseNotifier
and triggers side effects. -
NotifierRegister<
N extends BaseNotifier< Object?> > -
A widget that registers a
BaseNotifier
in the widget tree usingChangeNotifierProvider
.
Enums
- AsyncStatus
- The status of the state.