getDatabasesPath abstract method

Future<String> getDatabasesPath()

Get the default databases location path.

A relative path given to openDatabase is relative to this location.

When using sqflite (Flutter plugin):

  • On Android, it is typically data/data/<package_name>/databases
  • On iOS and MacOS, it is the Documents directory

With sqflite_common_ffi, it is .dart_tool/sqflite_common_ffi/databases in the current directory: fine for tests and scripts, but an application should use its own location (for example from the path_provider package), absolute paths or setDatabasesPath.

With sqflite_common_ffi_web, it is /: on the web a path is only a name.

Implementation

Future<String> getDatabasesPath();