data_binding 0.2.3

Flutter Android iOS web

Library data_binding is an observable data holder class. It is lifecycle-aware, meaning it respects the lifecycle of widgets. This awareness ensures it only updates widget observers that are in an act

data_binding #

This is a library of Flutter for data binding works as similar as what Android does.

类Android的Flutter数据绑定库。

How to use #

  1. Create sub class of BaseViewModel with Observables.

​ 创建BaseViewModel的子类,在其中添加多个Observable

  1. Create sub class of BindingWidgetBuilder, which builds Widget with the data from a Observable.

​ 创建BindingWidgetBuilder的子类,其用某个Observable的数据来生成Widget。

  1. binding() the Observable and the BindingWidgetBuilder.

​ 用binding()绑定ObservableBindingWidgetBuilder

  1. When the property of the Observable in the ViewModel was changed, the Widget would be updated.

​ 当ViewModel中的Observableproperty被改变时,Widget也会更新。

0
likes
80
pub points
0%
popularity

Library data_binding is an observable data holder class. It is lifecycle-aware, meaning it respects the lifecycle of widgets. This awareness ensures it only updates widget observers that are in an active lifecycle state.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

chrisfang6@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on data_binding