I built my database through SQLITE. I read the values from the database and created my page. Then I realized one fact. IOS and ANDROID have different paths in which DATABASE is stored.
It is my database code :
initDB() async{
Directory dbDir = await getApplicationDocumentsDirectory();
String path = join(dbDir.path, "social2.db");
print('init...');
print(path);
return await openDatabase(
path,
version: 1,
onOpen: (db) {},
onCreate: (Database db, int version) async{
await db.execute('''
CREATE TABLE $tableName(
id INTEGER PRIMARY KEY,
email TEXT,
password TEXT,
name TEXT,
intro TEXT,
age TEXT,
image0 BLOB,
image1 BLOB,
image2 BLOB,
image3 BLOB,
image4 BLOB,
image5 BLOB,
vote INTEGER,
location TEXT) ''');
},
);
}
How can I use my database normally?