setState method

void setState(
  1. LiveDataCallBack<T> fn, {
  2. bool notify = true,
})

通知更新

Implementation

void setState(LiveDataCallBack<T> fn, {bool notify = true}) {
  if (hostDispose) {
    return;
  }
  fn(value);
  if (notify) {
    this.notifyListeners();
  }
}