The default SQLDriver
AndroidSqliteDriver(OfflinePersonalDataDb.Schema, context, "test.db")
creates the database in a default location:
/data/data/<Your-Application-Package-Name>/databases/test.db
can I change this location?
For future readers, the solution is to supply the absolute path to the name
parameter in the constructor of AndroidSqliteDriver
:
AndroidSqliteDriver(OfflinePersonalDataDb.Schema, context, "/storage/emulated/0/Android/data/<package>/files/test.db")
Here, I am giving a path in the SDCard in the emulator.
Just make sure that your application has the read-write permissions to that location.