buildIsarService static method
Implementation
static Future<Isar> buildIsarService() async {
final dir = await getApplicationDocumentsDirectory();
var isarInstance = Isar.getInstance('cosmos_epub');
if (isarInstance == null) {
final isar = await Isar.open(
[BookProgressModelSchema],
name: 'cosmos_epub',
directory: dir.path,
);
IsarService._create(isar);
return isar;
} else {
return isarInstance;
}
}