LiveData<T> constructor
LiveData<T> (
- T initValue, {
- String? name,
- bool verifyDataChange = false,
- StreamController<
T> ? streamController, - LifeCycleOwner? owner,
- Logger? logger,
Implementation
LiveData(
T initValue, {
this.name,
this.verifyDataChange = false,
StreamController<T>? streamController,
LifeCycleOwner? owner,
leisim.Logger? logger,
}) : initialValue = initValue,
_currentValue = initValue {
this.logger = logger ?? Logger.instance;
this.streamController = streamController ?? StreamController<T>.broadcast();
if (owner != null) {
this.owner(owner);
}
}