Replaces the data event handler of this subscription.
The handleData function is called for each element of the stream after this function is called. If handleData is null, further elements are ignored.
This method replaces the current handler set by the invocation of Stream.listen or by a previous call to onData.
void onData(void handleData(T data));
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-async/StreamSubscription/onData.html