ModelUpdatingEvent class

Event emitted before a model is updated in the database.

This event is cancellable - calling cancel will prevent the update.

Inheritance
Mixed-in types

Constructors

ModelUpdatingEvent({required Type modelType, required String tableName, required dynamic model, required Map<String, dynamic> originalAttributes, required Map<String, dynamic> dirtyAttributes, DateTime? timestamp})

Properties

dirtyAttributes Map<String, dynamic>
Only the attributes that have changed.
final
hashCode int
The hash code for this object.
no setterinherited
isCancelled bool
Whether this event has been cancelled.
no setterinherited
model → dynamic
The model being updated.
final
modelType Type
The runtime type of the model.
finalinherited
originalAttributes Map<String, dynamic>
The original attributes before changes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tableName String
The database table name.
finalinherited
timestamp DateTime
When the event occurred.
finalinherited

Methods

cancel() → void
Cancel this event, preventing further processing.
inherited
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