cancel method Null safety

  1. @mustCallSuper
void cancel()

Permanently disables this observable. Further changes to value will be ignored, the outputs onChanged, nextValue, and values will not be called again.

Implementation

@mustCallSuper
void cancel() => _canceled = true;