on method
void
on(
- void onData(
- T data
- void onError(
- Object error, [
- StackTrace? stackTrace
- void onDone()?,
Attaches the provided handlers to the stream subscription.
Implementation
void on(
void Function(T data)? onData, {
void Function(Object error, [StackTrace? stackTrace])? onError,
void Function()? onDone,
}) {
streamSubscription
..onData(onData)
..onError(onError)
..onDone(onDone);
}