Error message callback. The result string will be used as the error message.
typedef ErrorMessageProvider = FutureOr<String> Function(Exception exception);