SnackbarConfig constructor
const
SnackbarConfig({
- Duration duration = const Duration(seconds: 3),
- SnackbarPosition position = SnackbarPosition.bottom,
- Color? backgroundColor,
- Color? textColor,
- IconData? icon,
- Color? iconColor,
- String? actionLabel,
- VoidCallback? onActionPressed,
- Color? actionTextColor,
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(8)),
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 0),
- EdgeInsets margin = const EdgeInsets.all(16),
- Duration animationDuration = const Duration(milliseconds: 250),
- double? maxWidth,
- double? minWidth,
- double elevation = 6,
- bool showCloseButton = false,
- 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,
});