cancel method

  1. @mustCallSuper
void cancel()

Unsubscribes to existing Future or Stream and sets snapshot to 'none'.

Any data/error will be retained. Just as in Future/Stream builder.

Implementation

@mustCallSuper
void cancel() {
  _unsubscribe();
  value = snapshot.inState(ConnectionState.none);
}