LiveData<T>.useState constructor

LiveData<T>.useState(
  1. T _value, {
  2. bool notify = false,
})

需要手动调用 liveData.dispose() 销毁

Implementation

LiveData.useState(this._value, {bool notify = false}) {
  if (notify) {
    notifyListeners();
  }
}