defaultErrorMessageResolver function Null safety

String defaultErrorMessageResolver(
  1. dynamic error
)

The default ErrorMessageResolver.

Implementation

String defaultErrorMessageResolver(dynamic error) {
  String? message;
  try {
    message = error.message;
  } catch (e) {}
  return message ?? '$error';
}