When entering information in the sqlite database, I encounter the following error (image).
What is the solution to fix this error?
static Future _onCreate(Database db, int version) async {
await db.execute("CREATE TABLE users(id INTEGER PRIMARY KEY AUTOINCREMENT,groupId INTEGER ,name TEXT)");
await db.execute("CREATE TABLE costs(id INTEGER PRIMARY KEY AUTOINCREMENT,title TEXT,price INTEGER,groupId INTEGER,partners TEXT,buyer TEXT,FOREIGN KEY(buyer) REFERENCES users(name))");
}