handleError method
void
handleError(
- dynamic error
Implementation
void handleError(dynamic error) {
// Handle errors based on user-defined logic
if (onError != null) {
onError!(error);
} else {
// Default error handling
print('Error: $error');
}
}