4-Flutter SQLite
4-Flutter SQLite
Whenever you need to store the data on the local then you need to
use SQLite to persist the user data.
sqflite:
path_provider:
Before you read and write data to the database, you need to open a
connection to the database. This involves two steps:
''');
return ("Database
Created============================");
}
The most important operations must done on table is insert data, update
data, delete data, and any special Queries as per user needs.
Now we are going to show you how you can perform an operation on the
SQLite database.
//Read Data From Database
readData(String sql) async {
Database? mydb = await db;
List<Map> response = await mydb!.rawQuery(sql);
return response;
}