errorPropertyChecking function
Implementation
void errorPropertyChecking(AuthService authService) async {
try {
await authService.signInWithEmailAndPassword(
email: 'user@example.com',
password: 'password',
);
} on AuthException catch (e) {
// Check if error is recoverable
if (e.isRecoverable) {
showRetryButton();
} else {
showFatalErrorScreen();
}
// Check if it's a network issue
if (e.isNetworkRelated) {
scheduleRetry();
}
// Check if it's a validation error
if (e.isValidationError) {
highlightFormField();
}
// Access error severity
if (e.severity == AuthErrorSeverity.critical) {
sendAlertToSupport();
}
// Access metadata for debugging
print('Error metadata: ${e.metadata}');
}
}