StreamController<T> class Null safety. A controller with the stream it controls . This controller allows sending data, error and done events on its stream. This class can be used to create a simple stream that others can listen on, and to push events to that stream.