ComToastConfig constructor
const
ComToastConfig({
- ComToastType? type,
- ComToastPresentation? presentation,
- ComToastPosition? position,
- Duration? duration,
- Color? backgroundColor,
- Color? textColor,
- double? fontSize,
- EdgeInsets? padding,
- double? borderRadius,
- double? maxWidth,
- int? animationDuration,
- bool? clickThrough,
- bool? showShadow,
- Color? shadowColor,
- Offset? shadowOffset,
- double? shadowBlurRadius,
- IconData? icon,
- Widget? iconWidget,
- double? iconSize,
- Color? iconColor,
- double? iconSpacing,
- Widget builder(
- BuildContext context
- VoidCallback? onTap,
- bool? showCloseButton,
- double? topMargin,
- double? bottomMargin,
Implementation
const ComToastConfig({
ComToastType? type,
ComToastPresentation? presentation,
ComToastPosition? position,
Duration? duration,
this.backgroundColor,
this.textColor,
double? fontSize,
EdgeInsets? padding,
double? borderRadius,
double? maxWidth,
int? animationDuration,
bool? clickThrough,
bool? showShadow,
Color? shadowColor,
Offset? shadowOffset,
double? shadowBlurRadius,
this.icon,
this.iconWidget,
double? iconSize,
this.iconColor,
double? iconSpacing,
this.builder,
this.onTap,
bool? showCloseButton,
double? topMargin,
double? bottomMargin,
}) : type = type ?? ComToastType.normal,
presentation = presentation ?? ComToastPresentation.toast,
position = position ?? ComToastPosition.center,
duration = duration ?? const Duration(milliseconds: 1500),
fontSize = fontSize ?? 14.0,
padding = padding ??
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
borderRadius = borderRadius ?? 12.0,
maxWidth = maxWidth ?? 0.85,
animationDuration = animationDuration ?? 300,
clickThrough = clickThrough ?? true,
showShadow = showShadow ?? true,
shadowColor = shadowColor ?? const Color(0x1A000000),
shadowOffset = shadowOffset ?? const Offset(0, 4),
shadowBlurRadius = shadowBlurRadius ?? 8.0,
iconSize = iconSize ?? 20.0,
iconSpacing = iconSpacing ?? 8.0,
showCloseButton = showCloseButton ?? false,
topMargin = topMargin ?? 12.0,
bottomMargin = bottomMargin ?? 100.0,
_specifiedFields = (type == null ? 0 : _typeField) |
(presentation == null ? 0 : _presentationField) |
(position == null ? 0 : _positionField) |
(duration == null ? 0 : _durationField) |
(fontSize == null ? 0 : _fontSizeField) |
(padding == null ? 0 : _paddingField) |
(borderRadius == null ? 0 : _borderRadiusField) |
(maxWidth == null ? 0 : _maxWidthField) |
(animationDuration == null ? 0 : _animationDurationField) |
(clickThrough == null ? 0 : _clickThroughField) |
(showShadow == null ? 0 : _showShadowField) |
(shadowColor == null ? 0 : _shadowColorField) |
(shadowOffset == null ? 0 : _shadowOffsetField) |
(shadowBlurRadius == null ? 0 : _shadowBlurRadiusField) |
(iconSize == null ? 0 : _iconSizeField) |
(iconSpacing == null ? 0 : _iconSpacingField) |
(showCloseButton == null ? 0 : _showCloseButtonField) |
(topMargin == null ? 0 : _topMarginField) |
(bottomMargin == null ? 0 : _bottomMarginField);