errorWidgetByErrorCode method

  1. @protected
Widget errorWidgetByErrorCode(
  1. BuildContext context,
  2. ScreenManagerCubitStateDisplayErrorPageByErrorCode state
)
inherited

Builds the full-page error widget for ScreenManagerCubitStateDisplayErrorPageByErrorCode.

Converts state.errorCode to a human-readable message via BlocXLocalizations.errorCodeMessage and renders a BlocxErrorWidget.

Override to customise per-error-code UI or to add retry / reporting callbacks.

Implementation

@protected
Widget errorWidgetByErrorCode(
  BuildContext context,
  ScreenManagerCubitStateDisplayErrorPageByErrorCode state,
) {
  final readable = ReadableError(
    message: loc.errorCodeMessage(state.errorCode),
    error: state.error,
    stackTrace: state.stackTrace,
  );
  return BlocxErrorWidget(error: readable);
}