copyToHasData method

SnapState<T> copyToHasData(
  1. Object? data
)

Copy the state to a new state in the data status

Implementation

SnapState<T> copyToHasData(Object? data) {
  return copyWith(
    status: StateStatus.hasData,
    data: data is T ? data : this.data,
    infoMessage: '',
    isImmutable: data is T,
  );
}