openSync static method
Isar
openSync(
- List<
CollectionSchema> schemas, { - required String directory,
- String name = defaultName,
- int maxSizeMiB = Isar.defaultMaxSizeMiB,
- bool relaxedDurability = true,
- CompactCondition? compactOnLaunch,
- bool inspector = true,
Open a new Isar instance.
Implementation
static Isar openSync(
List<CollectionSchema<dynamic>> schemas, {
required String directory,
String name = defaultName,
int maxSizeMiB = Isar.defaultMaxSizeMiB,
bool relaxedDurability = true,
CompactCondition? compactOnLaunch,
bool inspector = true,
}) {
_checkOpen(name, schemas);
/// Tree shake the inspector for profile and release builds.
assert(() {
if (!_kIsWeb && inspector) {
_IsarConnect.initialize(schemas);
}
return true;
}());
return openIsarSync(
schemas: schemas,
directory: directory,
name: name,
maxSizeMiB: maxSizeMiB,
relaxedDurability: relaxedDurability,
compactOnLaunch: compactOnLaunch,
);
}