RistoStatusSwitcher constructor
const
RistoStatusSwitcher({
- Key? key,
- required RistoUiState state,
- required WidgetBuilder contentBuilder,
- WidgetBuilder? loadingBuilder,
- WidgetBuilder? emptyBuilder,
- WidgetBuilder? errorBuilder,
- String? defaultEmptyTitle = 'No data available',
- String? defaultEmptySubtitle,
- String? defaultErrorTitle = 'An error occurred',
- String? defaultErrorSubtitle,
- VoidCallback? onRetry,
- Duration duration = const Duration(milliseconds: 400),
- Alignment alignment = Alignment.topCenter,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- double? width,
- double? height,
- double? minWidth,
- double? maxWidth,
- double? minHeight,
- double? maxHeight,
- Color? backgroundColor,
- Color? borderColor,
- double borderWidth = 1.0,
- double borderRadius = 16.0,
- double? elevation,
- Color? shadowColor,
- Clip clipBehavior = Clip.none,
Implementation
const RistoStatusSwitcher({
super.key,
required this.state,
required this.contentBuilder,
this.loadingBuilder,
this.emptyBuilder,
this.errorBuilder,
this.defaultEmptyTitle = 'No data available',
this.defaultEmptySubtitle,
this.defaultErrorTitle = 'An error occurred',
this.defaultErrorSubtitle,
this.onRetry,
this.duration = const Duration(milliseconds: 400),
this.alignment = Alignment.topCenter,
this.margin,
this.padding,
this.width,
this.height,
this.minWidth,
this.maxWidth,
this.minHeight,
this.maxHeight,
this.backgroundColor,
this.borderColor,
this.borderWidth = 1.0,
this.borderRadius = 16.0,
this.elevation,
this.shadowColor,
this.clipBehavior = Clip.none,
});