CLErrorPage class
Standard error page widget for the GenAI Components framework.
Displays an error icon, optional title, error code, message, detail, and up to two action buttons (onRetry and onGoHome).
Designed to be used as a default fallback for GoRouter.errorBuilder
or Modular.configure(errorBuilder:), but can also be used standalone
inside any page that needs a consistent error UI.
Example:
CLErrorPage(
errorCode: '404',
title: 'Pagina non trovata',
message: 'La risorsa richiesta non esiste.',
onGoHome: () => context.go('/'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CLErrorPage
- Available extensions
Constructors
- CLErrorPage({Key? key, String? errorCode, String? title, String? message, String? detail, VoidCallback? onRetry, VoidCallback? onGoHome})
-
const
Properties
- detail → String?
-
Optional technical detail (e.g. stack trace summary, request id).
final
- errorCode → String?
-
Optional error code (e.g.
404,500, custom app codes).final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- message → String?
-
Optional human-readable message describing the error.
final
- onGoHome → VoidCallback?
-
Optional go-home callback. Renders a secondary button when provided.
final
- onRetry → VoidCallback?
-
Optional retry callback. Renders a primary button when provided.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String?
-
Optional title. Defaults to
'Errore'when null.final
Methods
-
animateOnActionTrigger(
AnimationInfo animationInfo, {bool hasBeenTriggered = false}) → Widget -
Available on Widget, provided by the AnimatedWidgetExtension extension
-
animateOnPageLoad(
AnimationInfo animationInfo) → Widget -
Available on Widget, provided by the AnimatedWidgetExtension extension
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited