onError method

void onError(
  1. Object error,
  2. StackTrace stackTrace
)

Global error handler for this adapter's lifecycle.

Called whenever an error occurs during onBind, onInit, or onDispose.

error The exception or object thrown. stackTrace The stack trace associated with the error.

Implementation

void onError(Object error, StackTrace stackTrace) {
  debugPrint('[Adapter:$id] Error: $error');
  debugPrint(stackTrace.toString());
}