OptionError constructor

const OptionError({
  1. Key? key,
  2. required Object? error,
  3. VoidCallback? onRetry,
  4. TextStyle? textStyle,
  5. double iconSize = 48.0,
  6. Color? iconColor,
  7. double spacing = 16.0,
  8. bool showRetryButton = true,
  9. String retryButtonText = 'Retry',
})

Creates an OptionError widget.

  • error: The error object or message to display. Can be any object or a string.
  • onRetry: Optional callback for retry functionality.
  • textStyle: Custom text style (uses default if null).
  • iconSize: Size of the error icon.
  • iconColor: Color of the error icon (uses theme error color if null).
  • spacing: Spacing between elements.
  • showRetryButton: Whether to show the retry button.
  • retryButtonText: Text for the retry button.

Implementation

const OptionError({
  super.key,
  required this.error,
  this.onRetry,
  this.textStyle,
  this.iconSize = 48.0,
  this.iconColor,
  this.spacing = 16.0,
  this.showRetryButton = true,
  this.retryButtonText = 'Retry',
});