SonnerNotification class

A notification instance that can be controlled

Properties

alignment Alignment
final
builder Widget Function(BuildContext, NotificationData, SonnerNotification)
final
data NotificationData
final
hashCode int
The hash code for this object.
no setterinherited
id String
final
onAnimatedClose Future<void> Function()
final
onClose VoidCallback
final
onReplace → void Function(Widget)
final
priority NotificationPriority
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Close the notification with animation
closeImmediately() → void
Close the notification immediately (without animation)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replace(Widget newWidget) → void
Replace the notification content
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) SonnerNotification?
Access notification data from context
ofData(BuildContext context) NotificationData
Access notification data from context (for backward compatibility)