OnConfigure class

Annotation for define OnConfigure method for database. Prototype of the function called before calling onCreate/onUpdate/onOpen when the database is open. Post initialization should happen here. This annotation must be applied on a method in the database class. Method syntax is also important. Example:

@DB(
  name: 'note_db',
  version: 1,
  entities: [Note],
)
abstract class NoteDB {
  @OnConfigure()
  Future<void> onConfigure(Database db) async {
    print('onConfigure');
  }
}

Constructors

OnConfigure()
const

Properties

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