initialize method

Future<void> initialize()

Waits for the database to be initialized, meaning that all connections are fully set up and migrations ran.

It is not required to call this method before using the database, drift calls it internally where necessary. However, it can be useful to explicitly await migrations.

Implementation

Future<void> initialize() async {
  await currentSession();
}