Setting up new project
So the first thing to do is to create a new flutter project using command line on your IDE, I'm going to use visual studio code in this tutorial.
Creating all needed pages
In this project I will try to make an app that will let us do some CRUD operations using SQLite in flutter. so here are the pages that we'll need.
You need to create a new folder inside lib
folder and call it pages
inside this folder I'll create 4 pages.
- -pages/
- home_page.dart
- view_product_page.dart
- add_product_page.dart
- update_product_page.dart
Now you also need to create a model class for our product, that's why I'm going to create a new folder named models
inside the lib
folder and create a new dart file named product.dart
inside this models folder.
One more thing to do is to create a new folder called services
inside the lib
folder which will contain a new dart file I'll called dbhelper.dart
.
Finally the structure of this project will look like this for now.