-
Adds a type alias of Rx class as
Signal
. Allows you to initialize mediator variables with theSignal
annotation.For example,
final _int1 = 0.signal;
final _int2 = Signal(0);
final _int3 = Signal(0);
// computed mediator variable
final _sum = Signal(() => int1 + int2 + int3);
-
Support mediator variable of type
Function
, to use as a computed mediator variable.For example,
final _sum = Rx(() => int1 + int2 + int3 as dynamic); // use `dynamic` if the return type along with the computed function will change
get sum => _sum.value;
set sum(value) => _sum.value = value;
- Imporve
RxList
,RxSet
, andRxMap
.
- Fix example and document.
- Fix example and migrate to flutter 2.8
- Improve documents.
- Add
globalHost
for compatibility with lite and persistence version.
- Update documents.
- Update documents.
- Update documents.
- Add a branch version, Flutter Mediator Persistence, which provides built in persistence.
- Minor improvement.
- Fix problems when working with shared_preferences.
- Fix
WidgetsFlutterBinding.ensureInitialized()
issue.
- Fix
- Update example to use shared_preferences with locale.
- Minor improvements.
- Change the type of the system tag to
int
.
- Improve documents.
- Minor improvements.
- Add Global Broadcast capabilities:
globalBroadcast()
, to broadcast to all the globalconsumer widgets.globalConsumeAll(Widget Function() create, {Key? key})
, to create a widget which will be rebuilt whenever any watched variables changes are made.globalFrameAspects
, a getter, to return the updated aspects of the Global Mode.globalAllAspects
, a getter, to return all the aspects that has been registered to the Global Mode.
- Minor improvement.
- Fix dartdoc fail.
- Fix static analysis fail.
- Update the example_global_mode, to put the watched variables into a file and then import it.
-
Add
Global
class for monitoring global variables asGlobal Mode
.-
Add
globalWatch(variable)
to return a watched variable. -
Add
globalConsume(() => Text('${watchedVar.value}'))
to create a widget that register the watched variable to the host. -
Add
globalGet<T>({Object? tag})
to retrieve the watched variable from another file.- With
globalWatch(variable)
, the watched variable will be retrieved by theType
of the variable, i.e. retrieve byglobalGet<Type>()
. - With
globalWatch(variable, tag: object)
, the watched variable will be retrieved by the tag, i.e. retrieve byglobalGet(tag: object)
.
- With
-
-
RxImpl class:
-
Add
rxImpl.notify()
, synonym ofrxImpl.publishRxAspects()
, to notify the host to rebuild. -
Add
rxImpl.ob
(a getter), tonotify()
the host to rebuild and then return the underlying object. -
Add
rxImpl.consume(Widget Function() fn, {Key? key})
, a helper function totouch()
itself first and thenglobalConsume
.
-
-
Change the first parameter of
MultiHost.create
to named parameter asMultiHost.create({List<Host>? hosts, required Widget child})
. -
Add an example to demonstrate the usage of the
Global Mode
in theexample_global_mode
folder
- Add
Host.model<Model>()
, and deprecatePub.model<Model>()
,Pub.getModel<Model>()
- Null safety support.
- Migrate to null safety.
- Fix static analysis fail.
- Change
InheritedModelOfMediator
toInheritedMediator
and extends fromInheritedWidget
.
- Document improvement.
- Add
Pub.model<Model>()
, the same asPub.getModel<Model>()
.
- Add
MultiHost.create
.
-
Add
rxSub
, rx automatic aspect, generates and maintains aspect for the rx variables automatically. -
Add
Controller
class. -
Add View Map.
-
Rename
Publisher
class toPub
. -
Remove
Host.getInheritedOfModel<Model>(context)
, usePub.getModel<Model>()
instead. -
Update example, add an i18n page.
-
Document improvement.
-
Change named parameter
create
of the extension to position parameter.
- Document improvement.
- Document improvement.
- Add rx aspects management.
- Initial release.