copyWith method

  1. @override
StreamStatus<TState> copyWith({
  1. TState? state,
  2. TState? oldState,
  3. EventBase? event,
})
override

Creates a copy of this status with optionally overridden values.

Implementation

@override
StreamStatus<TState> copyWith({
  TState? state,
  TState? oldState,
  EventBase? event,
}) {
  return UpdatingStatus(
    state ?? this.state,
    oldState ?? this.oldState,
    event ?? this.event,
  );
}