PowerSyncDatabase.withDatabase constructor
PowerSyncDatabase.withDatabase({
- required Schema schema,
- required SqliteDatabase database,
- Logger? loggers,
Open a PowerSyncDatabase on an existing SqliteDatabase.
Migrations are run on the database when this constructor is called.
logger
defaults to autoLogger, which logs to the console in debug builds.
Implementation
factory PowerSyncDatabase.withDatabase(
{required Schema schema,
required SqliteDatabase database,
Logger? loggers}) {
return PowerSyncDatabaseImpl.withDatabase(
schema: schema, database: database);
}