stated library
Classes
- CancellationToken
-
Construct for the
Task
to check withing the closure if it has been cancelled while awaiting IO - Disposer
- Generic Disposer mixin Allows for the registration of dispose callbacks to be called on dispose Also acts as a decorator to inform the framework the class is disposable
-
FutureStatedBuilder<
T> -
ListenableBuilder<
T extends Listenable> -
A similar construct like Flutter's
AnimationBuilder
that also provides thelistenable
via the builder delegate. This can be useful when a complex expression is needed to resolve thelistenable
instance. Eg: ListenableBuilder.value( listenable: context.get - Notifier
- This only helps to access the protected notifyListeners.
-
ObservableList<
T> -
ObservableValue<
T> - ReverseDisposer
- Serializer
- TODO: add int, double, num, DateTime, ...
-
Stated<
T> - A Custom ValueListenable implementation Can be used in with ListenableBuilder or StatedBuilder The value is never assigned directly, but rather built using build
-
StatedBuilder<
T extends Listenable> - A builder widget, meant to be used for creating and using a Listenable bloc
- Store
- StoreProvider
- This will not add a widget dependency, hence allowing for use during initState
Mixins
- AsyncInit
- Disposable
- Locator
- Sync locator
- Register
- Resolver
- Async locator (mainly to enable lazy async)
- Tasks
- Tasks mixin provides an easy way to sequence async work Eg: ... enqueue(() async { await Future.delayed(Duration(seconds: 10)); print('10 secs'); }); enqueue(() async { await Future.delayed(Duration(seconds: 10)); print('1 sec'); }); Output: 10 secs 1 sec
Extensions
Typedefs
-
CancellableTaskDelegate
= Future<
void> Function(CancellationToken token) -
FactoryDelegate<
T> = StoreFactory< T> Function(Resolver e) -
ListenableBuilderCreate<
T extends Listenable> = T Function(BuildContext context) -
ListenableBuilderDelegate<
T extends Listenable> = Widget Function(BuildContext context, T listenable, Widget? child) -
LocatorCreateDelegate<
T> = T Function(Locator e) -
ResolverCreateDelegate<
T> = Future< T> Function(Resolver e) -
StatedBuilderDelegate<
T extends Listenable> = Widget Function(BuildContext context, T bloc, Widget? child) -
StatedCreateDelegate<
T extends Listenable> = T Function(BuildContext context) -
TaskDelegate
= Future<
void> Function() -
TypedTaskDelegate<
T> = Future< T> Function()