I've been looking for video tutorials on Flutter with MySQL back-end CRUD functions, to show how we can build app, etc. So, thanks so much for your help. I will use this one and will explore your channel for more.
Excellent video. I'am graduating here in Brazil and you helped me a lot. Congratulations for you work and thank you :) ( i used the google translator kkkk).
I faced an issue between min 30:40 to min 31:21, when I clicked on the add button for creating a table then not getting any response. So please tell me how to resolve this issue.
i dont get the part in 11:16 can you make a more detailed video about the json and model classes. Im a big fan and you motivated me to do coding and im trying to do the starting part to excel in coding. love you much love please respond
Man I have some questions, if i make an application like that and I upload it to google play is the app gonna be able to save data in mysql without data or internet? i'm new on this topic and i can't find information.
For those who have problems: IN SERVICES.DART static const ROOT = '10.0.2.2/handlelisteDB/db.php'; final Uri url = Uri.parse(ROOT); final response = await http.post(url, body: map); Dont worry about the error in php file with the _post, you should still be able to make requests. Also i recommend when checking for response in create table, make an else statement under the if statement run showSnackBar then you can see if it fails and if snack bar works.
i am getting this error when run: adb shell setprop debug.firebase.analytics.app com.google.android.apps.maps 06-22 10:00:03.371 8684-12657/? W/SQLiteConnection: Could not change the database journal mode of '/data/data/com.google.android.gms/databases/phenotype.db' from 'wal' to 'PERSIST' because the database is locked. This usually means that there are other open connections to the database which prevents the database from enabling or disabling write-ahead logging mode. Proceeding without changing the journal mode.
I have a noob question! why do you write string to check before? like here -----> if ('success' == $result) I've learnt it to do it like this ------> if ($result == 'success') are these both same? & if no, then why do you use it like that?
@@MobileProgrammer my mean only this i create a database and connect to a project and grab the data in dart file and use that dart file in main code. drive.google.com/file/d/153rkWjyIAqVvxEARiSGFUWSwO-IaEoF8/view?usp=sharing like this
please can you provide php source code file. because i tried to make my same as yours but it is showing some errors and those errors are not resolving. it would be a great help . thanks in advance.
I am curious.. Can we use oracle database or mysql on flutter? I just started learning flutter but only db option I see is firebase and sqflite. There is php + mysql option too but I do not know php. Is there way to connect flutter app to oracle or mysql db straight up and use sql query to pull out the result?
@@MobileProgrammer Could you make tutorial crud operation with oracle db & mysql? I looked around but they only use firebase or sqflite. I couldn't find any documentation or videos using oracle or mysql(besides the one that uses php).
I bought a flutter app and I wnat to learn how to set it up with a database and change it's name + package name and insert push notification in it , what languages should I learn (I want to learn programming not just for this app ) ? what is the process of installing a flutter app to a MYSQL database ? and how long will it take me to learn how to set the app with a database ?, and would you make a toutorial on it in the near future ? 🌸
Great tutorial, thank you so much.... May i ask you something ?.... I am confusing to put these files (Employee.dart, Services.dart and DataTableDemo.dart). Where should i put those files (as we know main.dart file is in the lib folder) ?.... Thanks in advance....
Hi Mobile Programmer, that is a wonderful demo... thanks a lot for putting this together... Just wanted to know if this is vulnerable, because anyone knowing the url ROOT can make modifications to the database... Is there any measure that we can take?
When i pressed the create button, the response was createTable >> Response :: error. Any idea why this happened? I'm noob so i just follow the code as is.
Hi, my XAMPP is up and running, PHP script is done, but how do I git-clone the MySQLDataTable branch to VS Code to start as a new flutter project? What link should I use? Do I clone the master and then locally switch to MySQLDataTable? or is there a git clone link for the MySQLDataTable branch? anyone? .... Never mind I downloaded the Master and accessed the MySQLDataTable recourses.
How do you correct error: flutter Exception has occurred. FormatException (FormatException: Unexpected character (at character 1) ^ ) when parsing json?
I have a problem. Employee employee The argument type 'int' can't be assigned to the parameter type 'String'. line: Services.updateEmployee( employee.id, _firstNameController.text, _lastNameController.text) error in "employee.id"
@41.29, having just finished building the UI, upon restarting the app suddenly there is a record of id:1, first_name: John; last_name: Hancock. Where did this data come from? Anyone?
@@MobileProgrammer Was this mock data already present in the TestDB inside phpAdmin? The UI came up nicely in emulation Chrome browser, but the Create Table function did not work, aside from changing the title bar. Since the TestDB has no table at this point, data could be added. I could directly add a table in the phpAdmin, but that would bypass the app. Since you were able to add multiple records in the demo, the table was already existing in the TestDB, right?
@@MobileProgrammer I confirm that the app is able to create the Employee table and add new records, verifiable in MySQL in XAMPP. But does not update the UI. Seems like the getEmployee() is not working. But it is great that app is talking to the script and successfully inserted data into the database. That is a great step forward. Thank you.
hi sir, i have an error on Services.dart i can not create a any method in Services.dart using static Future Class like etc... please give me a solution for this
@@MobileProgrammer thank you for replying, I had a doubt that this is done on VS code so the source code available in the link for VS code is where. I am having difficulty finding it
VS code is just an editor. You can run it on any editor of your choice. All you have to run is the flutter commands to run the app. You can find all the code in my repo. Link should be in the description
hi, let's say i used this Method to create my database and had a table for users and added a list inside in another, will all the users be able to add to that list and view its content ?
@@MobileProgrammer what I mean is if i had a table for Users and a Table for a list of items, will all the users be able to see the items and add to them, and will the liste be the same for all users ?
i need to update datarow from list not json object while click on button. dynamically add and remove datarow from table.(data created from edit textbox)
@@MobileProgrammer can i get reference code? I tried with replacing list. But i didn't know correct syntax to do it. stackoverflow.com/questions/58451457/get-selected-row-index-from-dynamic-datatable-flutter
@@MobileProgrammer i tried it. I am unable to get selected row index value (it removes last object from list) . can you submit answer to my stackoverflow question? Wokring code to Developercoder10@gmail.com .
Now everything is working with me except that line _>$action = $_POST["action"]; and my map is {action: CREATE_TABLE} but the creation of table did not complete yet so what is the problem?
Does it work with the app running on my mobile phone connecting to the same WIFI, but the Mysql server runs on my computer which also connects to my local WIFI.
@@MobileProgrammer i can't accept it No i mean that it indicates that is an error of compilation with a red line. "the named parameter 'columns' isn't defined". the same for 'rows'.
im also getting this error which i cannot work out why either Compiler message: lib/DataTableDemo.dart:84:24: Error: A value of type 'List' can't be assigned to a variable of type 'List'. - 'List' is from 'dart:core'. - 'Production/*1*/' is from 'package:missioncontrol/Employee.dart' ('lib/Employee.dart'). - 'Production/*2*/' is from 'package:missioncontrol/Employee.dart' ('lib/Employee.dart'). _employees = employees; ^
@@MobileProgrammer I failed to ask right question, localhost is limited to device (laptop or PC) while connected device is different host, having totally different operating system. So the question is ADB supports that too while development or we have to use emulator while development of the such an app which access data from localhost and database
@@shishirkumarsky If you have already connected your phone to the same router wifi as your pc, change your ROOT address in the dart from localhost to your pc IP. Ex static const ROOT = 'localhost/tutorial/employee_action.php'; to 'Your IP4 address/tutorial/employee_action.php';
_createTable(){ _showProgress('Creating Table...'); Services.createTable().then((result) { if (result == 'success') { _showSnackBar(context, result); _showProgress(widget.title); } }); } when i run this code, i can create table in mysql but if statement did not work. When i add else statement inside it, it will show error and when i check in mysql, table created. It only can work in chrome, if i run in emulator, it just keep running and did not show up anything. Can you have any suggestion?
how to export to apk file with PHP, for that some data from database MySQL was displayed in APK application, Mobile Programmer? It's Posible to export PHP and database mysql, that some data was displayed in apk application? Can you show it, Mobile Programmer?
thank you so much! I'm a beginer. I have a problem during first step creating a table. I press the add button and the app stay in the "creating table..." process. I followed all the steps. Can you sugest me any revision.?
Hello, you can correct the problem of the 'action', changing the following line: localhost/Employees/employee_actions.php 192.168.1.84/Employees/employee_actions.php (your ip address)
This is such a big help for a new Flutter developer like me. Looking forward for another useful videos like this. Thank you for sharing this video.
You are welcome
I've been looking for video tutorials on Flutter with MySQL back-end CRUD functions, to show how we can build app, etc. So, thanks so much for your help. I will use this one and will explore your channel for more.
You are always welcome.
Same
Awesome Tutorial. Very helpful. Better than any other tutorial on youtube.
Guys, this guys helped me so much. Keep supporting him. Thanks biddy.
This might be the best tutorial for flutter
its so difficult to understand file structure for beginner learner ...although learn more get the stricture syntax ....love it
Thanks for the tutorial !!! Appreciated it !!!
Great video and rich content, I loved your way to write the code and the comments.
What a seniority.
Thankyou Muath
This is awesome. Great Tutorial. Keep making such useful videos. Thanks
Excellent video. I'am graduating here in Brazil and you helped me a lot. Congratulations for you work and thank you :) ( i used the google translator kkkk).
I am glad to hear that. You are welcome and please support.
Thanks for the video.. Keep posting such wonderful tutorials
I faced an issue between min 30:40 to min 31:21,
when I clicked on the add button for creating a table then not getting any response.
So please tell me how to resolve this issue.
Thank you so much for the tutorial. Didn't always work as in the video, but I could get it to work with some searching on the web.
instead of xampp can i use mysql workbench
This is so awesome even for a Beginner like me. Thanks.
Bro are you mallu?? If you giving flutter training or internship please let me know..
Professional work excellent 👍
i dont get the part in 11:16 can you make a more detailed video about the json and model classes. Im a big fan and you motivated me to do coding and im trying to do the starting part to excel in coding.
love you much love please respond
You are the Best. Simply awesome.
Thankyou
Nice job. well done 👌
Thanks Man you save me alot
You are welcome.
so nice tutorial... Make Vigo video app (short video social media) step by step flutter, php mysql, firebase complete tutorial plz sir...
nice tutorial, helped me start my new startup.. thanks!
You are welcome
thank you. thank you so much.
I followed your video and it was a perfect success.
Good to hear that.
Very nice presentation👍
This tutorial is awesome, i love it
Man I have some questions, if i make an application like that and I upload it to google play is the app gonna be able to save data in mysql without data or internet? i'm new on this topic and i can't find information.
Thank you ! this is very useful and complete video
For those who have problems:
IN SERVICES.DART
static const ROOT = '10.0.2.2/handlelisteDB/db.php';
final Uri url = Uri.parse(ROOT);
final response = await http.post(url, body: map);
Dont worry about the error in php file with the _post, you should still be able to make requests.
Also i recommend when checking for response in create table, make an else statement under the if statement run showSnackBar then you can see if it fails and if snack bar works.
Great tutorial! It would be awesome if you can make a user registration and login with flutter and MySQL tutorial
Sure. Will do
Sorry! Can you tell me the WYSIWYG are you using in your website!?
Great Tutorial. Kudos..
Thanks. Please support by subscribing.
Amazing, Thank you Sir
Thanks a lot,
you saved me🤗
Excellent, thanks for you Tutorial !!
Thank you so much. No sound, but amazing tutorial. Absolutely loved it.
what if the text controller is integer? what should i do
You can use toInt method
Hi, will I have to have to change the database Collation? Default it is selected utf8mb4_general_ci will I must have to change it??? Please tell me.
Should be fine.
Sir, I've followed each and every step, also included the internet permission, and there are no errors even then i am getting no output. Please help
i am getting this error when run: adb shell setprop debug.firebase.analytics.app com.google.android.apps.maps
06-22 10:00:03.371 8684-12657/? W/SQLiteConnection: Could not change the database journal mode of
'/data/data/com.google.android.gms/databases/phenotype.db' from 'wal' to 'PERSIST' because the database is locked.
This usually means that there are other open connections to the database which prevents the database from enabling or
disabling write-ahead logging mode. Proceeding without changing the journal mode.
You are amazing! This was really amazing. Thanks!
You are welcome
11:07 hey thanks for your tutorial, but can you help me at 11:07 ?, where's your flutter folder location, should it be same folder as server?
They need not be same. Make sure your service call has correct path
I really love this tutorial
Thankyou
THANKS FOR YOUR VIDEO. REALLY I LEARNT
You are always welcome. Please consider subscribing if you find my videos useful. Thanks
I just wanted you to know
I love you and thank you very much
Can you tell me how to send the values from the listview to datatable
Could you do a tutorial on how to insert a list in mysql with flutter?
This video is very helpful.
Thankyou
great tutorial
nice tutorial!!
I have a noob question!
why do you write string to check before? like here -----> if ('success' == $result)
I've learnt it to do it like this ------> if ($result == 'success')
are these both same? & if no, then why do you use it like that?
Both are same
can we get the same thing with node js instead of php please..?
we can add the mysql database on assests folder ?
I love you man
can i create a data dart fie using mysql connection and create a dart data file and use data in application . is that easy or not . reply please
Sorry, I don’t understand your question.
@@MobileProgrammer my mean only this i create a database and connect to a project and grab the data in dart file and use that dart file in main code.
drive.google.com/file/d/153rkWjyIAqVvxEARiSGFUWSwO-IaEoF8/view?usp=sharing like this
please can you provide php source code file. because i tried to make my same as yours but it is showing some errors and those errors are not resolving. it would be a great help . thanks in advance.
I am curious.. Can we use oracle database or mysql on flutter? I just started learning flutter but only db option I see is firebase and sqflite. There is php + mysql option too but I do not know php. Is there way to connect flutter app to oracle or mysql db straight up and use sql query to pull out the result?
Yes of course, you can use any db you want. It’s not flutter dependent. As long as the service returns data, any db is fine.
@@MobileProgrammer Could you make tutorial crud operation with oracle db & mysql? I looked around but they only use firebase or sqflite. I couldn't find any documentation or videos using oracle or mysql(besides the one that uses php).
@@GoodGuy374 the server side in this tutorial is PHP+MYSQL. what you looking for is PHP+ORACLE. flutter part is the same, 100%.
Is it save to communicate over php file with mysql from flutter like this ?
It’s just a demonstration, you can add your layer of security on top of that.
Mobile Programmer alright thx ✌🏼
I bought a flutter app and I wnat to learn how to set it up with a database and change it's name + package name and insert push notification in it , what languages should I learn (I want to learn programming not just for this app ) ? what is the process of installing a flutter app to a MYSQL database ? and how long will it take me to learn how to set the app with a database ?, and would you make a toutorial on it in the near future ?
🌸
how can i post an array from flutter to server and insert it into mysql, i couldnt find any guide in the internet PLEASE HELP!
is this methode work for oracle 10g database. if not can you make it.
Flutter is independent of any backend database technology
helo i got "Create Table Response: Well Done your connected" in console but my table is not created please help
Great tutorial, thank you so much.... May i ask you something ?.... I am confusing to put these files (Employee.dart, Services.dart and DataTableDemo.dart). Where should i put those files (as we know main.dart file is in the lib folder) ?.... Thanks in advance....
All dart files should go to lib folder but you can have sub folders.
Hi Mobile Programmer, that is a wonderful demo... thanks a lot for putting this together...
Just wanted to know if this is vulnerable, because anyone knowing the url ROOT can make modifications to the database... Is there any measure that we can take?
Amazing video!
Thanks
Awesome tutor, Thanks
You're welcome!
When i pressed the create button, the response was createTable >> Response :: error. Any idea why this happened? I'm noob so i just follow the code as is.
Please check if you have the correct query to create the table and there are no syntax errors.
@@MobileProgrammer hi, thank you for responding. i believe the query is correct, the error i get is from the php file.
Will you be able to print the error message from the php file, not the one you coded.
yes i was able to print the error message on the php file
What was the error?
thanks for tutorial, but how about pagination ?
Hi, my XAMPP is up and running, PHP script is done, but how do I git-clone the MySQLDataTable branch to VS Code to start as a new flutter project? What link should I use? Do I clone the master and then locally switch to MySQLDataTable? or is there a git clone link for the MySQLDataTable branch? anyone? .... Never mind I downloaded the Master and accessed the MySQLDataTable recourses.
I got these (getTextBeforeCursor on inactive InputConnection) something wrong with connection
I can add employe but I've some issue, the getEmploye doesn't work, to see the employe in the app. I verified the codes, I didn't found the problem.
What is the issue or error you are getting?
@@MobileProgrammer just I don't receive the data in app. I can add the employee in DB but they don't come in App.
Delete this string ("// This file should reside on the server, not inside this app.") in php file.
Hope it can help u, thanks!
How do you correct error: flutter Exception has occurred. FormatException (FormatException: Unexpected character (at character 1) ^ )
when parsing json?
Is your json in proper format? Please double check
@@MobileProgrammer I think so but how do I check?
Print the json in console and see . Put it in some website that validates json
More of real world apps feature thanks
I have a problem.
Employee employee
The argument type 'int' can't be assigned to the parameter type 'String'.
line: Services.updateEmployee(
employee.id, _firstNameController.text, _lastNameController.text)
error in "employee.id"
Convert to a string or integer
@41.29, having just finished building the UI, upon restarting the app suddenly there is a record of id:1, first_name: John; last_name: Hancock. Where did this data come from? Anyone?
It’s just a mock data
@@MobileProgrammer Was this mock data already present in the TestDB inside phpAdmin? The UI came up nicely in emulation Chrome browser, but the Create Table function did not work, aside from changing the title bar. Since the TestDB has no table at this point, data could be added. I could directly add a table in the phpAdmin, but that would bypass the app. Since you were able to add multiple records in the demo, the table was already existing in the TestDB, right?
Yeah, that data came from MySQL
@@MobileProgrammer I confirm that the app is able to create the Employee table and add new records, verifiable in MySQL in XAMPP. But does not update the UI. Seems like the getEmployee() is not working. But it is great that app is talking to the script and successfully inserted data into the database. That is a great step forward. Thank you.
hi sir,
i have an error on Services.dart
i can not create a any method in Services.dart using static Future Class like etc...
please give me a solution for this
What is the error showing?
Undefined index: action i am getting this issue for this line $action = $_POST['action']; please help
You have to send the query parameters from flutter.
@@MobileProgrammer thanksss
You are welcome
HOOOOOOOOOOOOOOWWWWWW!!!!!!!!!!!!!!!!!???
all the codes are performed on which platform?
What do you mean?
@@MobileProgrammer thank you for replying, I had a doubt that this is done on VS code so the source code available in the link for VS code is where. I am having difficulty finding it
VS code is just an editor. You can run it on any editor of your choice. All you have to run is the flutter commands to run the app. You can find all the code in my repo. Link should be in the description
@@MobileProgrammer so if I have done the server side using VS code then I can't use android studio for the UI part? I am sorry I am just very confused
Those are two different things. Doesn’t matter. Use any editor I want
Thanks for sharing.
hi, let's say i used this Method to create my database and had a table for users and added a list inside in another, will all the users be able to add to that list and view its content ?
What do you mean by add a list inside another? Its based on your DB design...nothing to do with Flutter.
@@MobileProgrammer what I mean is if i had a table for Users and a Table for a list of items, will all the users be able to see the items and add to them, and will the liste be the same for all users ?
That is up to you how you design your db
@@MobileProgrammer so the information i put in my db is accessible to all my users if i want it to be, thanks for the clarification
i need to update datarow from list not json object while click on button. dynamically add and remove datarow from table.(data created from edit textbox)
You can do the same way like with Json array. Just remove the item from the list and call setstate on the list
@@MobileProgrammer can i get reference code? I tried with replacing list. But i didn't know correct syntax to do it. stackoverflow.com/questions/58451457/get-selected-row-index-from-dynamic-datatable-flutter
Create a pubic variable List, then assign the data to it when you click a row, then remove from the list. call setState on the list.
@@MobileProgrammer i tried it. I am unable to get selected row index value (it removes last object from list) . can you submit answer to my stackoverflow question? Wokring code to Developercoder10@gmail.com .
Can i use this method for real project
Yup, but add your security.
why dont you use dark on backend?
Now everything is working with me except that line _>$action = $_POST["action"]; and my map is {action: CREATE_TABLE} but the creation of table did not complete yet so what is the problem?
Did you try logging the values on the server ?
How do I log values on the server?
@@MobileProgrammer
I need help on synch.if you added data on offline then when you turn on the network it will synch the data
Listen for the network changes and sync the data.
@@MobileProgrammer do you have tutorial about it please?
Does it work with the app running on my mobile phone connecting to the same WIFI, but the Mysql server runs on my computer which also connects to my local WIFI.
I don't think so or your system should be a public server.
does not make the table with create_table method ..
I have a question, How is it working in the real device?
That’s the idea.
Failed assertion: line 273 pos 15: 'columns != null': is not true.
i got this error message.How can i fix it ?
Did u try to restart the app?
The Mobile Programmer yes the same error persists
Actually when I wrote culmuns and rows. It underlined the items and tell me that both of them are undefined parameter
What do you mean by underlined? Did you add any widgets for underlining?
@@MobileProgrammer i can't accept it
No i mean that it indicates that is an error of compilation with a red line.
"the named parameter 'columns' isn't defined". the same for 'rows'.
im also getting this error which i cannot work out why either
Compiler message:
lib/DataTableDemo.dart:84:24: Error: A value of type 'List' can't be assigned to a variable of type 'List'.
- 'List' is from 'dart:core'.
- 'Production/*1*/' is from 'package:missioncontrol/Employee.dart' ('lib/Employee.dart').
- 'Production/*2*/' is from 'package:missioncontrol/Employee.dart' ('lib/Employee.dart').
_employees = employees;
^
Thanks Sir GBU
Any help? I can write on DB but cannot push on the mobile screen despide getEmployees Response is perfect
Did u call setstate in the variable?
I have use this code www.coderzheaven.com/2019/09/28/flutter-datatable-mysql/
I didn't call nope
setState call to the variable will refresh the UI attached to that variable.
_getEmployees() {
_showProgress('Loading Employees...');
Services.getEmployees().then((employees) {
setState(() {
_employees = employees;
});
_showProgress(widget.title); // Reset the title...
print("Length ${employees.length}");
});
}
I have not watched complete tutorial yet, and watching! Will it work on real device too, instead of emulator?
I mean if we keep the USB debugging on!
It wil work on real devices because that’s our final goal
@@MobileProgrammer I failed to ask right question, localhost is limited to device (laptop or PC) while connected device is different host, having totally different operating system. So the question is ADB supports that too while development or we have to use emulator while development of the such an app which access data from localhost and database
@@shishirkumarsky If you have already connected your phone to the same router wifi as your pc, change your ROOT address in the dart from localhost to your pc IP. Ex static const ROOT =
'localhost/tutorial/employee_action.php'; to 'Your IP4 address/tutorial/employee_action.php';
Amazing!! Why people always use firebase? Php is simple
for Real time on firebase
Firebase have more features like real-time database, push notifications, function etc..
that is so amazing
Tried to copy your code and got error
a global key was used multiple times inside one widget child list
The global key is only used to show a snackbar here
_createTable(){
_showProgress('Creating Table...');
Services.createTable().then((result) {
if (result == 'success') {
_showSnackBar(context, result);
_showProgress(widget.title);
}
});
}
when i run this code, i can create table in mysql but if statement did not work. When i add else statement inside it, it will show error and when i check in mysql, table created. It only can work in chrome, if i run in emulator, it just keep running and did not show up anything. Can you have any suggestion?
Please check the response form server
how to export to apk file with PHP, for that some data from database MySQL was displayed in APK application,
Mobile Programmer? It's Posible to export PHP and database mysql, that some data was displayed in apk application? Can you show it,
Mobile Programmer?
not possible. php and apk are not even remotely close
@@MobileProgrammer ARE YOU SURE? I SAID THAT TO MY CLIENT
Thank you!
You are welcome
wow, this video can be my reference.. but can you make tutorial video to create date time picker on flutter? thanks
Yeah. Will try.
@@MobileProgrammer ty, for listen.. and ill wait your video and your next video. thanks
thank you so much! I'm a beginer. I have a problem during first step creating a table. I press the add button and the app stay in the "creating table..." process. I followed all the steps. Can you sugest me any revision.?
same problem
Hello, you can correct the problem of the 'action', changing the following line:
localhost/Employees/employee_actions.php
192.168.1.84/Employees/employee_actions.php (your ip address)
Are you seeing any error in the console?
@@MobileProgrammer no, no error in the console. Please help.
@@ronealdenila9364 did you manage to solve the problem? Please help.