state_beacon_flutter library
reactive primitive and statemanagement for flutter
Classes
-
AsyncData<
T> - A class that represents a value that is loaded asynchronously.
-
AsyncError<
T> - A class that represents an error that occurred while loading a value.
-
AsyncIdle<
T> - A class that represents an idle state.
-
AsyncLoading<
T> - A class that represents a value that is being loaded asynchronously.
-
AsyncValue<
T> - A class that represents a value that is loaded asynchronously. It can be in one of the following states:
- BeaconController
- An abstract mixin class that automatically disposes all beacons created by this controller.
-
BeaconFamily<
Arg, BeaconType extends ReadableBeacon> -
This returns a beacon that is created using the provided
create
function. The beacon is cached and returned if the same argument is provided again. - BeaconGroup
-
An alternative to the global beacon creator ie:
Beacon.writable(0)
; that keeps track of all beacons and effects created so they can be disposed/reset together. This is useful when you're creating multiple beacons in a stateful widget or controller class and want to dispose them together. - BeaconObserver
- A class that observes beacons.
- BeaconScheduler
-
Effects
are not synchronous, their execution is controlled by a scheduler. When a dependency of aneffect
changes, it is added to a queue and the scheduler decides when is the best time to flush the queue. By default, the queue is flushed with a DARTVM microtask which runs on the next loop; this can be changed by setting a custom scheduler. Flutter comes with its own scheduler, so it is recommended to use flutter's scheduler when using beacons in a flutter app. This can be done by callingBeaconScheduler.useFlutterScheduler();
in themain
function. -
BufferedCountBeacon<
T> - A beacon that exposes a buffer of values that have been added to it.
-
BufferedTimeBeacon<
T> - A beacon that exposes a buffer of values that have been added to it based on a timer.
-
DebouncedBeacon<
T> - A beacon that debounces updates to its value.
- Disposable
- An abstract class that provides a contract for disposing resources.
-
FilteredBeacon<
T> - A beacon that filters updates to its value based on a function.
-
FutureBeacon<
T> -
See
Beacon.future
-
ListBeacon<
E> - A beacon that holds a list of values.
- LoggingObserver
- A beacon observer that logs to the console.
-
MapBeacon<
K, V> - A beacon that holds a map of values.
-
PeriodicBeacon<
T> - A beacon that emits values periodically.
-
Producer<
T> - The base class for all beacons.
-
RawStreamBeacon<
T> - See: Beacon.rawStream()
-
ReadableBeacon<
T> - An immutable beacon.
-
SetBeacon<
E> - A beacon that holds a set of values.
-
StreamBeacon<
T> - See: Beacon.stream()
- TextEditingBeacon
- A beacon that wraps a TextEditingController.
-
ThrottledBeacon<
T> - A beacon that throttles updates to its value.
-
TimestampBeacon<
T> - A beacon that attaches a timestamp to its value.
-
UndoRedoBeacon<
T> - A beacon that allows undo/redo operations.
-
WritableBeacon<
T> - A beacon that can be written to.
Mixins
-
BeaconControllerMixin<
T extends StatefulWidget> - A mixin that automatically disposes all beacons created by this Widget.
Extensions
-
BoolUtils
on WritableBeacon<
bool> -
IntUtils
on WritableBeacon<
T> -
ListUtils
on List<
T> -
ReadableAsyncBeaconUtils
on ReadableBeacon<
AsyncValue< T> > -
ReadableBeaconFlutterUtils
on ReadableBeacon<
T> -
ReadableBeaconUtils
on ReadableBeacon<
T> -
ReadableBeaconWrapUtils
on ReadableBeacon<
T> -
StreamUtils
on Stream<
T> -
WidgetUtils
on BaseBeacon<
T> - @macro WidgetUtils
-
WritableAsyncBeacon
on WritableBeacon<
AsyncValue< T> > -
WritableBeaconFlutterUtils
on WritableBeacon<
T> - @macro WritableBeaconFlutterUtils
-
WritableBeaconUtils
on WritableBeacon<
T> -
WritableWrap
on BeaconWrapper<
T, U>
Constants
- Beacon → const _BeaconCreator
- Global beacon creator
Typedefs
-
BaseBeacon<
T> = Producer< T> - The BaseBeacon type. Alias for Producer.
-
ObserverCallback<
T> = void Function(T prev, T next)