ElegantNotification constructor

ElegantNotification({
  1. Key? key,
  2. Widget? title,
  3. required Widget description,
  4. required Widget? icon,
  5. Color background = Colors.white,
  6. BorderRadius? borderRadius,
  7. BoxBorder? border,
  8. bool showProgressIndicator = true,
  9. Widget closeButton(
    1. void dismissNotification()
    )?,
  10. StackedOptions? stackedOptions,
  11. double notificationMargin = 20,
  12. Color progressIndicatorColor = Colors.blue,
  13. Duration toastDuration = const Duration(milliseconds: 3000),
  14. bool displayCloseButton = true,
  15. void onCloseButtonPressed()?,
  16. void onProgressFinished()?,
  17. Alignment position = Alignment.topRight,
  18. AnimationType animation = AnimationType.fromRight,
  19. Duration animationDuration = const Duration(milliseconds: 600),
  20. double iconSize = defaultIconSize,
  21. Widget? action,
  22. bool autoDismiss = true,
  23. double? height,
  24. double? width,
  25. double? progressBarHeight,
  26. double? progressBarWidth,
  27. EdgeInsetsGeometry? progressBarPadding,
  28. dynamic onDismiss()?,
  29. bool isDismissable = true,
  30. DismissDirection dismissDirection = DismissDirection.horizontal,
  31. Color progressIndicatorBackground = greyColor,
  32. void onNotificationPressed()?,
  33. Curve animationCurve = Curves.ease,
  34. 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();
}