mobx_observer_widgets 0.0.1 copy "mobx_observer_widgets: ^0.0.1" to clipboard
mobx_observer_widgets: ^0.0.1 copied to clipboard

discontinued
outdated

Simplified observing of values through MobX store.

MobX Observer Widgets #

Simplified observing of values through MobX store in Flutter.

Introduction #

This library helps developers who use MobX for state management to flattern their widget tree.

Example #

Regular use od MobX in Flutter

Observer(
    builder: (context) =>  Text(
	    '${counter.counter}',
	    style:  Theme.of(context).textTheme.display1,
    ),
)

Same example with MobX Observer Widgets

ObserverText(
    (context) =>  "${counter.counter}",
    style:  Theme.of(context).textTheme.display1,
)

Full example

For full code example with MobX and MobX Observer Widgets see the example project.

Supported Widgets #

The original widget is prefixed with word Observer and constructor similiar to the original one is provided.

ObserverText

ObserverText(
    (context) =>  "${counter.counter}",
    style:  Theme.of(context).textTheme.display1,
)

ObserverText.rich

ObserverText.rich(
    (context) =>  TextSpan(text:  "${counter.counter}"),
    style:  Theme.of(context).textTheme.display1,
)
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Simplified observing of values through MobX store.

Homepage

License

unknown (LICENSE)

Dependencies

flutter, flutter_mobx, mobx

More

Packages that depend on mobx_observer_widgets