RistoStatusSwitcher constructor

const RistoStatusSwitcher({
  1. Key? key,
  2. required RistoUiState state,
  3. required WidgetBuilder contentBuilder,
  4. WidgetBuilder? loadingBuilder,
  5. WidgetBuilder? emptyBuilder,
  6. WidgetBuilder? errorBuilder,
  7. String? defaultEmptyTitle = 'No data available',
  8. String? defaultEmptySubtitle,
  9. String? defaultErrorTitle = 'An error occurred',
  10. String? defaultErrorSubtitle,
  11. VoidCallback? onRetry,
  12. Duration duration = const Duration(milliseconds: 400),
  13. Alignment alignment = Alignment.topCenter,
  14. EdgeInsetsGeometry? margin,
  15. EdgeInsetsGeometry? padding,
  16. double? width,
  17. double? height,
  18. double? minWidth,
  19. double? maxWidth,
  20. double? minHeight,
  21. double? maxHeight,
  22. Color? backgroundColor,
  23. Color? borderColor,
  24. double borderWidth = 1.0,
  25. double borderRadius = 16.0,
  26. double? elevation,
  27. Color? shadowColor,
  28. 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,
});