setState<T> method
通知订阅LiveData的组件更新。 notify 参数表示可关闭通知更新,只执行fn。
Implementation
void setState<T>(LiveData liveData, LiveDataCallBack<T> fn,
{bool notify = true}) {
liveData.setState((cv) {
fn(cv);
}, notify: notify);
}
通知订阅LiveData的组件更新。 notify 参数表示可关闭通知更新,只执行fn。
void setState<T>(LiveData liveData, LiveDataCallBack<T> fn,
{bool notify = true}) {
liveData.setState((cv) {
fn(cv);
}, notify: notify);
}