cancel method

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

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