VooNotificationItem class
Represents a notification item for the notifications bell
Constructors
-
VooNotificationItem({required String id, required String title, String? subtitle, DateTime? timestamp, IconData? icon, Widget? iconWidget, Color? iconColor, Color? iconBackgroundColor, bool isRead = false, bool isUrgent = false, VoidCallback? onTap, VoidCallback? onDismiss, Map<
String, dynamic> ? metadata, List<VooNotificationAction> ? actions}) -
const
Properties
-
actions
→ List<
VooNotificationAction> ? -
Optional action buttons for the notification
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
Icon for the notification type
final
- iconBackgroundColor → Color?
-
Background color for the icon container
final
- iconColor → Color?
-
Color for the icon
final
- iconWidget → Widget?
-
Custom icon widget (takes precedence over icon)
final
- id → String
-
Unique identifier for the notification
final
- isRead → bool
-
Whether the notification has been read
final
- isUrgent → bool
-
Whether this is an urgent/important notification
final
-
metadata
→ Map<
String, dynamic> ? -
Additional metadata for custom use
final
- onDismiss → VoidCallback?
-
Callback when the notification is dismissed
final
- onTap → VoidCallback?
-
Callback when the notification is tapped
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- relativeTime → String
-
Returns a human-readable relative time string
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - subtitle → String?
-
Optional subtitle/description
final
- timestamp → DateTime?
-
When the notification was created
final
- title → String
-
Title/headline of the notification
final
Methods
-
copyWith(
{String? id, String? title, String? subtitle, DateTime? timestamp, IconData? icon, Widget? iconWidget, Color? iconColor, Color? iconBackgroundColor, bool? isRead, bool? isUrgent, VoidCallback? onTap, VoidCallback? onDismiss, Map< String, dynamic> ? metadata, List<VooNotificationAction> ? actions}) → VooNotificationItem - Creates a copy of this notification with the given fields replaced
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited