ModelSavingEvent class

Event emitted before a model is saved (create or update).

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

Inheritance
Mixed-in types

Constructors

ModelSavingEvent({required Type modelType, required String tableName, dynamic model, required Map<String, dynamic> attributes, DateTime? timestamp})

Properties

attributes Map<String, dynamic>
Attributes that will be persisted.
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 saved (may be null for inserts created from maps/DTOs).
final
modelType Type
The runtime type of the model.
finalinherited
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