CNotification.inline constructor

CNotification.inline({
  1. Key? key,
  2. required Widget title,
  3. required Widget subtitle,
  4. Widget? caption,
  5. bool hideCloseButton = false,
  6. CNotificationKind kind = CNotificationKind.info,
  7. CNotificationContrast contrast = CNotificationContrast.low,
  8. VoidCallback? onCloseButtonTap,
  9. VoidCallback? onClose,
  10. int? timeout,
  11. List<CNotificationActionButton>? actions,
})

Implementation

CNotification.inline({
  Key? key,
  required Widget title,
  required Widget subtitle,
  Widget? caption,
  bool hideCloseButton = false,
  CNotificationKind kind = CNotificationKind.info,
  CNotificationContrast contrast = CNotificationContrast.low,
  VoidCallback? onCloseButtonTap,
  VoidCallback? onClose,
  int? timeout,
  List<CNotificationActionButton>? actions,
})  : assert((timeout == null && onClose == null) || (timeout != null && onClose != null)),
      assert((hideCloseButton && onCloseButtonTap == null) || (!hideCloseButton && onCloseButtonTap != null)),
      props = CNotificationInlineProps(
        actions: actions,
        title: title,
        subtitle: subtitle,
        hideCloseButton: hideCloseButton,
        kind: kind,
        contrast: contrast,
        onCloseButtonTap: onCloseButtonTap,
        onClose: onClose,
        timeout: timeout,
      ),
      _type = CNotificationType.inline,
      super(key: key);