NativeDatabase constructor

  1. File file,
  2. {bool logStatements = false,
  3. DatabaseSetup? setup}

Creates a database that will store its result in the file, creating it if it doesn't exist.

If logStatements is true (defaults to false), generated sql statements will be printed before executing. This can be useful for debugging. The optional setup function can be used to perform a setup just after the database is opened, before drift is fully ready. This can be used to add custom user-defined sql functions or to provide encryption keys in SQLCipher implementations.


factory NativeDatabase(File file,
    {bool logStatements = false, DatabaseSetup? setup}) {
  return NativeDatabase._(_NativeDelegate(file, setup), logStatements);