filmov
tv
Quick Setup | Flutter & SQFLITE DB Connection | Android Studio | Create Table | Insert, Display Data

Показать описание
Quickest & The Easiest Way To Connect FLUTTER with SQFLITE database.
Download Code:-
-------------------------------
Hey guys, now we shall be connecting the flutter app with database and Insert data. Also we shall display a data but only in console as our main aim is to connect database on SQFLITE.
Now, I created a blog which contains steps & code. Link is given in the description. Then you just have to follow my steps as per the video.
First, we shall create a new flutter application. I am using Android studio.
Observe that in project explorer, there is a “lib” folder and inside it is a dart file.
Then a bulb symbol will appear. Click on “pub get”. It shall download dependencies.
Or you can click on the link which appeared at the top side of window.
Lets run an ANDROID SIMULATOR and RUN the project. It will take several minutes to run the project first time.
Once ran, click on the bottom button which increases the CLICK COUNT and displays on screen.
If you so desire, you can create a package folder and add that file inside it just like I am doing in this video.
In third step, you have to import that file & other libraries.
Then you need to give specific location of database_connector file. That is, your project name which in my case is “”tutorial1, then /, then package name if you database connector file is inside it, then /, then database connector file name.
Copy the code from 4th point,
Go to the ending curly bracket of class which is extending STATE class.
Paste the code just above the ending curly bracket.
5th point is to call a simple function called JustPrint on press of a button.
SAVE all files, Refresh the app. Or enable the HOT RELOAD.
The navigator for RUN Console is available at the bottom of android studio. As you can see that this function is only printing the text in RUN CONSOLE.
6th point is just that.
Now in 7th point, we have to call DBConInsert on button’s press event. That function will create a database, an employee table and insert one row.
SAVE IT and DO REFRESH if you don’t have HOT RELOAD.
Once clicked on button, it will display a new ID’s value in console.
Sometimes you may get this error. Just simply close SIMULATOR and ANDROID STUDIO OR VISUAL STUDIO CODE and restart them. And do this step again.
Now,, if you get an ID on click of button, go to 8th and last step. And copy DBCONDISPLAY function and paste it at on press event of button.
Click on button and you will get all the data in console. Lets insert new row. And display them again to confirm.
Now you can play around with code and you can figure out how the code works.
So that is it, thanks for watching. Like share and subscribe.
Download Code:-
-------------------------------
Hey guys, now we shall be connecting the flutter app with database and Insert data. Also we shall display a data but only in console as our main aim is to connect database on SQFLITE.
Now, I created a blog which contains steps & code. Link is given in the description. Then you just have to follow my steps as per the video.
First, we shall create a new flutter application. I am using Android studio.
Observe that in project explorer, there is a “lib” folder and inside it is a dart file.
Then a bulb symbol will appear. Click on “pub get”. It shall download dependencies.
Or you can click on the link which appeared at the top side of window.
Lets run an ANDROID SIMULATOR and RUN the project. It will take several minutes to run the project first time.
Once ran, click on the bottom button which increases the CLICK COUNT and displays on screen.
If you so desire, you can create a package folder and add that file inside it just like I am doing in this video.
In third step, you have to import that file & other libraries.
Then you need to give specific location of database_connector file. That is, your project name which in my case is “”tutorial1, then /, then package name if you database connector file is inside it, then /, then database connector file name.
Copy the code from 4th point,
Go to the ending curly bracket of class which is extending STATE class.
Paste the code just above the ending curly bracket.
5th point is to call a simple function called JustPrint on press of a button.
SAVE all files, Refresh the app. Or enable the HOT RELOAD.
The navigator for RUN Console is available at the bottom of android studio. As you can see that this function is only printing the text in RUN CONSOLE.
6th point is just that.
Now in 7th point, we have to call DBConInsert on button’s press event. That function will create a database, an employee table and insert one row.
SAVE IT and DO REFRESH if you don’t have HOT RELOAD.
Once clicked on button, it will display a new ID’s value in console.
Sometimes you may get this error. Just simply close SIMULATOR and ANDROID STUDIO OR VISUAL STUDIO CODE and restart them. And do this step again.
Now,, if you get an ID on click of button, go to 8th and last step. And copy DBCONDISPLAY function and paste it at on press event of button.
Click on button and you will get all the data in console. Lets insert new row. And display them again to confirm.
Now you can play around with code and you can figure out how the code works.
So that is it, thanks for watching. Like share and subscribe.
Комментарии