mobx_observer_widgets 0.0.3
mobx_observer_widgets: ^0.0.3

Flutter Android iOS web

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 flatten their widget tree.

Example #

Regular use of 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 similar 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
70
pub points
38%
popularity

Simplified observing of values through MobX store.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

veres.vit@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, flutter_mobx, mobx

More

Packages that depend on mobx_observer_widgets