SmartStateSnackbarConfig constructor
const
SmartStateSnackbarConfig({
- SnackbarPosition position = SnackbarPosition.bottom,
- SnackBarBehavior behavior = SnackBarBehavior.fixed,
- Duration duration = const Duration(seconds: 3),
- bool showCloseIcon = false,
- Color? closeIconColor,
- EdgeInsets? margin,
- EdgeInsets? padding,
- double? width,
- DismissDirection dismissDirection = DismissDirection.down,
- SnackbarStateConfig errorConfig = const SnackbarStateConfig(backgroundColor: Color(0xFFD32F2F), textColor: Colors.white, icon: Icons.error_outline),
- SnackbarStateConfig successConfig = const SnackbarStateConfig(backgroundColor: Color(0xFF388E3C), textColor: Colors.white, icon: Icons.check_circle_outline),
- SnackbarStateConfig loadingConfig = const SnackbarStateConfig(backgroundColor: Color(0xFF1976D2), textColor: Colors.white, icon: Icons.info_outline),
- VoidCallback? onTap,
- VoidCallback? onVisible,
Implementation
const SmartStateSnackbarConfig({
this.position = SnackbarPosition.bottom,
this.behavior = SnackBarBehavior.fixed,
this.duration = const Duration(seconds: 3),
this.showCloseIcon = false,
this.closeIconColor,
this.margin,
this.padding,
this.width,
this.dismissDirection = DismissDirection.down,
this.errorConfig = const SnackbarStateConfig(
backgroundColor: Color(0xFFD32F2F),
textColor: Colors.white,
icon: Icons.error_outline,
),
this.successConfig = const SnackbarStateConfig(
backgroundColor: Color(0xFF388E3C),
textColor: Colors.white,
icon: Icons.check_circle_outline,
),
this.loadingConfig = const SnackbarStateConfig(
backgroundColor: Color(0xFF1976D2),
textColor: Colors.white,
icon: Icons.info_outline,
),
this.onTap,
this.onVisible,
});