database property

Future<Database> get database

Implementation

Future<Database> get database async {
  if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
    databaseFactoryOrNull = null;
    sqfliteFfiInit();
    databaseFactory = databaseFactoryFfi;
  }

  if (_database != null) return _database!;

  _database = await _initDatabase();
  return _database!;
}