Tells values to discard values instead of retaining them.
Must only be used instead of listening to the values stream. If the stream has been listened to, this call fails. After calling this method, listening on the values stream fails.
Source
Future cancel() { // If values has been listened to, // this throws a StateError saying that stream has already been listened to, // which is a correct error message for this call too. return values.listen(null).cancel(); }