NotificationBatcher class
A notification batcher that reduces unnecessary widget rebuilds by batching multiple state changes together.
Constructors
- NotificationBatcher([BatchingConfig _config = BatchingConfig.defaultConfig])
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPending → bool
-
Checks if there are pending notifications.
no setter
- pendingCount → int
-
Gets the number of pending notifications.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → void - Cancels all pending notifications.
-
dispose(
) → void - Disposes of the batcher and cancels all pending operations.
-
flush(
) → void - Forces immediate execution of all pending notifications.
-
getStats(
) → Map< String, dynamic> - Gets batching statistics for debugging.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scheduleNotification(
VoidCallback callback, {int priority = 0}) → void - Schedules a notification to be batched.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited