onError method

  1. @protected
void onError (Object error, StackTrace stackTrace)
@protected

Method that is called when the stream reports an error. Prints the error message by default.

Implementation

@protected
void onError(Object error, StackTrace stackTrace) => print(error);