copyToIsIdle method

SnapState<T> copyToIsIdle({
  1. Object? data,
  2. String? infoMessage,
})

Copy the state to a new state in the idle status

Implementation

SnapState<T> copyToIsIdle({Object? data, String? infoMessage}) {
  return copyWith(
    status: StateStatus.isIdle,
    data: data is T ? data : this.data,
    infoMessage: infoMessage,
    isImmutable: data is T,
  );
}