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也会更新。

Libraries

base_view_model
base_widget
command
data_binding
observable