data property
T
get
data
Returns the currently deserialized and loaded data.
Throws an assertion error if the data is not yet loaded.
Implementation
T get data {
assert(
status == .loaded || status == .refresh,
"Data should only be accessed when ServiceStatus.loaded or refreshing.",
);
return _data as T;
}
set
data
(T newData)
Updates the currently loaded data with the given value.
Implementation
set data(T newData) {
if (_data != newData) {
_data = newData;
notifyChanged();
}
}