PasskeyErrorMessages class
Central mapping from typed exceptions to friendly, user-facing strings.
Every widget accepts an optional PasskeyErrorMessages so apps can localize or rebrand error copy without touching exception handling. When you don't pass one, PasskeyErrorMessages.defaults is used, which simply delegates to each exception's own PasskeyUiException.userMessage.
const spanish = PasskeyErrorMessages(
cancelled: 'Se canceló la solicitud de clave de acceso.',
unsupported: 'Las claves de acceso no están disponibles en este dispositivo.',
);
PasskeySignInButton(backend: backend, errorMessages: spanish, onSuccess: ...);
Constructors
- PasskeyErrorMessages({String? unsupported, String? cancelled, String? backend, String? duplicate, String? noCredentials, String? unknown})
-
Creates a PasskeyErrorMessages. Any message left null falls back to the
exception's built-in PasskeyUiException.userMessage.
const
Properties
- backend → String?
-
Copy for PasskeyBackendException.
final
- cancelled → String?
-
Copy for PasskeyCancelledException.
final
- duplicate → String?
-
Copy for PasskeyDuplicateException.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- noCredentials → String?
-
Copy for PasskeyNoCredentialsException.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unknown → String?
-
Copy for PasskeyUnknownException and any unrecognized error.
final
- unsupported → String?
-
Copy for PasskeyUnsupportedException.
final
Methods
-
messageFor(
Object error) → String -
Returns the user-facing message for
error, honoring any overrides. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaults → const PasskeyErrorMessages
- The default mapping, delegating to each exception's own message.