TableInsertEvent<T> class

Event emitted when a row is inserted into a table

Contains the newly inserted row and the event context with transaction metadata.

Example:

noteTable.insertEventStream.listen((event) {
  print('New note: ${event.row.title}');

  if (event.context.isMyTransaction) {
    print('I created this note!');
  }

  // Access reducer metadata
  if (event.context.event is ReducerEvent) {
    final reducerEvent = event.context.event as ReducerEvent;
    print('Created by reducer: ${reducerEvent.reducerName}');
  }
});
Inheritance

Constructors

TableInsertEvent(EventContext context, T row)

Properties

context EventContext
Context containing the Event and client access
final
hashCode int
The hash code for this object.
no setterinherited
row → T
The newly inserted row
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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