LiveData<T>.useState constructor

LiveData<T>.useState(
  1. T value, [
  2. bool notify = false
])

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

Implementation

LiveData.useState(T value, [bool notify = false])
    : _notify = notify,
      _value = value {
  if (notify) {
    notifyListeners();
  }
}