ElegantNotification constructor
ElegantNotification({
- Key? key,
- Widget? title,
- required Widget description,
- required Widget? icon,
- Color background = Colors.white,
- BorderRadius? borderRadius,
- BoxBorder? border,
- bool showProgressIndicator = true,
- Widget closeButton(
- void dismissNotification()
- StackedOptions? stackedOptions,
- double notificationMargin = 20,
- Color progressIndicatorColor = Colors.blue,
- Duration toastDuration = const Duration(milliseconds: 3000),
- bool displayCloseButton = true,
- void onCloseButtonPressed()?,
- void onProgressFinished()?,
- Alignment position = Alignment.topRight,
- AnimationType animation = AnimationType.fromRight,
- Duration animationDuration = const Duration(milliseconds: 600),
- double iconSize = defaultIconSize,
- Widget? action,
- bool autoDismiss = true,
- double? height,
- double? width,
- double? progressBarHeight,
- double? progressBarWidth,
- EdgeInsetsGeometry? progressBarPadding,
- dynamic onDismiss()?,
- bool isDismissable = true,
- DismissDirection dismissDirection = DismissDirection.horizontal,
- Color progressIndicatorBackground = greyColor,
- void onNotificationPressed()?,
- Curve animationCurve = Curves.ease,
- BoxShadow? shadow,
Implementation
ElegantNotification({
Key? key,
this.title,
required this.description,
required this.icon,
this.background = Colors.white,
this.borderRadius,
this.border,
this.showProgressIndicator = true,
this.closeButton,
this.stackedOptions,
this.notificationMargin = 20,
this.progressIndicatorColor = Colors.blue,
this.toastDuration = const Duration(milliseconds: 3000),
this.displayCloseButton = true,
this.onCloseButtonPressed,
this.onProgressFinished,
this.position = Alignment.topRight,
this.animation = AnimationType.fromRight,
this.animationDuration = const Duration(milliseconds: 600),
this.iconSize = defaultIconSize,
this.action,
this.autoDismiss = true,
this.height,
this.width,
this.progressBarHeight,
this.progressBarWidth,
this.progressBarPadding,
this.onDismiss,
this.isDismissable = true,
this.dismissDirection = DismissDirection.horizontal,
this.progressIndicatorBackground = greyColor,
this.onNotificationPressed,
this.animationCurve = Curves.ease,
this.shadow,
}) : super(key: key) {
_notificationType = NotificationType.custom;
checkAssertions();
}