xerkonix_error_handler
library
Classes
-
XkErrorCodes
-
Synthetic (non-HTTP) business codes used by the normalizer/adapter so that
timeout/connectivity failures resolve through the message registry like any
server-supplied
code.
-
XkErrorDialog
-
-
XkErrorHooks
-
A registry of on-code / on-status side-effect hooks.
-
XkErrorMessage
-
-
XkErrorMessageHandler
-
Legacy static, single-slot error-message handler.
-
XkErrorNormalizer
-
Maps raw failures (HTTP status codes, thrown exceptions, response envelopes)
into the typed XkError hierarchy.
-
XkErrorToast
-
A top-sliding overlay toast with auto-dismiss, at parity with the product's
showCosentioToast. Colours are configurable so apps can pass their own
theme tokens (defaults follow Material error/warn semantics).
-
XkMessageRegistry
-
A
code-keyed, localizable message registry.
Functions
-
showXkSnackBar(BuildContext context, String message, {XkToastSeverity severity = XkToastSeverity.error, Color? backgroundColor, Duration duration = const Duration(seconds: 3), SnackBarAction? action})
→ void
-
Shows the error message via ScaffoldMessenger as a SnackBar.
-
showXkToast(BuildContext context, String message, {XkToastSeverity severity = XkToastSeverity.error, Color? accentColor, Color? backgroundColor, Color? textColor, IconData? icon, Duration displayDuration = const Duration(milliseconds: 2800)})
→ void
-
Shows a top-sliding XkErrorToast. Falls back to a SnackBar when no
Overlay is available (parity with
showCosentioToast).