SnackbarConfig constructor

const SnackbarConfig({
  1. Duration duration = const Duration(seconds: 3),
  2. SnackbarPosition position = SnackbarPosition.bottom,
  3. Color? backgroundColor,
  4. Color? textColor,
  5. IconData? icon,
  6. Color? iconColor,
  7. String? actionLabel,
  8. VoidCallback? onActionPressed,
  9. Color? actionTextColor,
  10. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(8)),
  11. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 0),
  12. EdgeInsets margin = const EdgeInsets.all(16),
  13. Duration animationDuration = const Duration(milliseconds: 250),
  14. double? maxWidth,
  15. double? minWidth,
  16. double elevation = 6,
  17. bool showCloseButton = false,
  18. SnackbarAnimationType animationType = SnackbarAnimationType.slideUp,
})

Creates a configuration for custom snackbars

Implementation

const SnackbarConfig({
  this.duration = const Duration(seconds: 3),
  this.position = SnackbarPosition.bottom,
  this.backgroundColor,
  this.textColor,
  this.icon,
  this.iconColor,
  this.actionLabel,
  this.onActionPressed,
  this.actionTextColor,
  this.borderRadius = const BorderRadius.all(Radius.circular(8)),
  this.padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 0),
  this.margin = const EdgeInsets.all(16),
  this.animationDuration = const Duration(milliseconds: 250),
  this.maxWidth ,
  this.minWidth,
  this.elevation = 6,
  this.showCloseButton = false,
  this.animationType = SnackbarAnimationType.slideUp,
});