mediator library
Classes
-
Controller<
Model extends Pub> -
Host<
TModel extends Pub> -
Class Host handles the registration of consumer widget with
aspects
, and rebuild consumer widgets with aspects when updating. -
InheritedMediator<
TModel extends Pub> -
An InheritedModel subclass that is rebuilt by
_HostState
.TModel
is the type of the model. Aspect type always isObject
. -
InheritedMediatorElement<
TModel extends Pub> -
An Element that uses an InheritedMediator as its configuration.
TModel
is the type of the model. Aspect type always isObject
. - MultiHost
- MultiHost helps to create multiple hosts at once.
- Pub
- A base class for Models
-
Rx<
T> - Rx
- RxBool
-
Rx class for
bool
Type. - RxDouble
-
RxImpl<
T> - A proxy object class, for variables to turn into a watched one.
- RxInt
-
RxList<
E> -
RxMap<
K, V> - RxNum
-
RxSet<
E> - RxString
-
Rx class for
String
Type. -
Subscriber<
Model extends Pub> - The consumer widget class.
-
SubscriberAuto<
Model extends Pub> - The consumer widget class with automatic aspect.
- SubscriberGlobal
- The consumer widget class with automatic aspect and global model.
Extensions
- ModelAspectExtT on T
-
Extension for aspect from any type of
T
. -
RxAutoAspectExt
on CreatorFn<
Pub> - Extension for rx automatic aspect from create method CreatorFn.
- RxBoolExt on bool
- Extension for bool type to Rx object.
- RxDoubleExtension on double
- RxExt on T
- Extension for all others type to Rx object.
- RxIntExtension on int
-
RxListExt
on List<
E> -
rx
extension of RxList -
RxMapExt
on Map<
K, V> -
rx
extension of RxMap - RxNumExtension on num
-
RxSetExt
on Set<
E> -
rx
extension of RxSet - RxStringExt on String
- Extension for string type to Rx object.
- SignalExt on T
- Extension for Signal type aliase.
-
SignalListExt
on List<
E> -
signal
extension of RxList -
SignalMapExt
on Map<
K, V> -
signal
extension of RxMap -
SignalSetExt
on Set<
E> -
signal
extension of RxSet
Properties
-
globalAllAspects
→ HashSet<
Object> -
Return all the aspects that has been registered to the
Global Mode
.no setter -
globalFrameAspects
→ HashSet<
Object> -
Return the updated aspects of the
Global Mode
.no setter - globalPub → Pub
-
A getter, to return the global pub of the
Global Mode
.no setter
Functions
-
globalBroadcast(
) → void - Broadcast to all the consumer widgets.
-
globalConsume(
Widget create(), {Key? key}) → SubscriberGlobal - Create a comsume widget for the watched variable whose value is used inside the widget, and register it to the host to rebuild it when updating the watched variable.
-
globalConsumeAll(
Widget create(), {Key? key}) → Subscriber< Pub> - Create a consumer widget that will be rebuilt whenever any watched variables changes are made.
-
globalGet<
T> ({Object? tag}) → Rx -
Retrieve the watched variable by
tag
orType
ofT
-
globalHost(
{required Widget child}) → Widget - Create a InheritedModel widget to listen to the watched variables and rebuild related consumer widgets when updating the watched variable.
-
globalWatch<
T> (T v, {Object? tag}) → Rx< T> -
Create a watched variable from the variable
v
, a proxy object of the Type of Rx<T> -
ifInheritedModel<
Model extends Pub> (InheritedMediator< Model> ? inheritedModel) → bool -
ifModelTypeCorrect(
Type model, String fnstr) → bool -
ifRxAutoAspectEmpty(
List< Object> rxAutoAspectList) → bool -
ifStateModel<
Model extends Pub> (Pub? model) → bool -
ifTagMaximum(
int rxTagCounter) → bool -
numToString128(
int value) → String - Encode a number into a string
-
rxSub<
Model extends Pub> (CreatorFn< Model> create, {Key? key}) → SubscriberAuto<Model> -
A function for the Subscriber to create a
rx automatic aspect
widget. -
shouldExists(
Object? obj, String errmsg) → bool -
shouldNull(
Object? obj, String errmsg) → bool