Insert class

Annotation for define an insert method. Methods that annotated with this annotation can have only one input parameter that is an Entity or List of an Entity and cannot be nullable. If the input parameter is Entity, the return type can be Future

  @Insert(onConflict: OnConflictStrategy.ignore)
  Future<void> insert(Note note);

  @Insert(onConflict: OnConflictStrategy.ignore)
  Future<void> bulkInsert(List<Note> notes);

Constructors

Insert({OnConflictStrategy? onConflict})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
onConflict OnConflictStrategy?
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

Static Properties

fields ↔ _InsertFields
getter/setter pair