In this section, we'll create a new project, add the sqflite dependencies, and create our database through a SQL raw query. Then, we will test the database we've created by adding some mock data and printing it in the debug console. This will require a few methods to insert and retrieve data from the database.
Using sqflite databases
Creating an sqflite database
Let's create a new Flutter project from your editor. We can call it shopping. Follow the steps given here:
- As sqflite is a package, the first step to perform in order to be able to use it in our project is adding the dependency in the pubspec.yaml file.
In order to find the latest version of the dependency, please visit https://pub.dev/packages/sqflite...