Complete SQLite CRUD Operations in Flutter
HTML-код
- Опубликовано: 7 сен 2024
- SQLite CRUD Operations in Flutter
This video discusses how you can implement SQLite CRUD operations in Flutter application with the help of SQLite.
Points discussed
- Flutter form design with validation
- Display list of records in ListView widget
- SQLite insert, update, delete and retrieve operations
Tools used: VS Code, Android Emulator.
💖 Buy me a Coffee
➤ bit.ly/3L36ut4 (PayPal)
➤ bit.ly/3VF0iPT (Razorpay)
🌀 Related Videos
bit.ly/3bTNf3X : Getting Started with Flutter
bit.ly/2QwizgV : React js Todo App
goo.gl/ijPZQk : .Net Core Web API CRUD with Angular 7
goo.gl/AL18CP : Asp.Net Core MVC CRUD
goo.gl/ZHDEhP : Master Detail CRUD Web API + Angular
🔗 Find me in
Udemy : bit.ly/3RtyQSB
Facebook : / codaffection
GitHub : github.com/cod...
Discord : / discord
Twitter : / codaffection
#Flutter #Dart #CodAffection
goo.gl/RFY5C2 : Subscribe to CodAffection
goo.gl/bPcyXW : Buy me a Coffee
bit.ly/3bTNf3X : Getting Started with Flutter
bit.ly/2QwizgV : React js Todo App
goo.gl/ijPZQk : .Net Core Web API CRUD with Angular 7
goo.gl/AL18CP : Asp.Net Core MVC CRUD
This is the best SQlite tutorial, big up man
Glad you think so!
thanks for your nice explanation... with also your help on Angular, I am now able to create applications with easy...
I like how you are very systematic and logical.
Keep up the good work!
The best tutorial video i've ever see, the way you explain it step by step is so clear. You know very well what you do, thank you so much. Already subscribed to your channel and liked your video.
how come you have only 505 likes, when you are so so dam amazing, i like the way you explain, you make everything easy. i wish i have more than 1 like to give you
Soo glad I found this , would be better if it was on git repo
Thanks for your good tutorial. Please create a tutorial on exporting SQLite data to Excel, it will be really helpful as there are none with good quality.
@codAffection could u please provide source code files for above?
very informative video Sir can you show us CRUD operation on MSSQL using flutter app.
goos video, thanks for the share of you knowledge.
Glad you like them!
How can i delete multiple rows with angular and spring boot
Can you please update this with null safety? It's very important
thank you sir for all videos sir, please one request do a video for sqlite and ionic framework sir
please do angular,mysql,node js express
an offtopic ques:
which laptop should I buy for developing job?
Currently using a windows desktop; it's running quite well, but I want to switch to a laptop.
Thanks for the video. I am getting following error at 19.30 " Null check operator used on a null value". How do we get around that. Had to add "!"before "form" in if condition.
var form = _formKey.currentState;
if (form!.validate()) {
form.save();
print(_contact.name);
}
Can you pls make a tutorial on sqlite database for flutter using two or more tables
Love it..Best Tutorial
Thanks, a very interesting tutorial video.
Great tutorial 👌
Which theme you are using bro.
Night Owl.
Thank you
Excelent, good, thank you
Thank you so much for the wonderful videos. I have a quick question when you defined the _onCreateDB method you defined 2 parameters, whereas while invoking that method you didn't specify any arguments to it. Could you please explain what's the logic behind this? Thanks again!
Very nice tutorial...I am a total newbee...I keep getting errors. I have checked your article where you share some part of the code, but not all. Could please share the complete source code?
great video - would be good if you had code in github repo .... may be there but I couldnt find it
I am getting a trouble for the asynchronous suspension whenever i try to input some data into the field and press submit @54:40
I am facing the same problem. did you fix it ?
Thank you for the enlightenment, Sir.
Your database syntax is easy to comprehend for it was very readable.
I want to adopt your syntax, but I have some difficulties to do so.
I have multiple tables in my project.
I’m trying to connect those tables with Primary Key and Foreign Key.
One of those tables requires Primary Key on each column.
Unfortunately, I couldn't find any examples in the internet on database creation that connects multiple tables with more than one Primary Key or table with Foreign Keys in your style.
Could you give me an example on how to connect two tables with Primary Key and Foreign Key, Sir?
This is my table models example:
class Group {
int id;
String name;
String mobile;
static const tblContact = 'contact';
static const colId = 'id';
static const colName = 'name';
static const colMobile = 'mobile';
Contact({
this.id,
this.name,
this.mobile,
});
Map toMap() {
var map = {colName: name, colMobile: mobile};
if (id != null) map[colId] = id;
return map;
}
Contact.fromMap(Map map) {
id = map[colId];
name = map[colName];
mobile = map[colMobile];
}
}
//The table which requires Primary Key on each column
class Group {
int id;
String family;
String friends;
String colleagues;
String acquaintances;
static const tblGroup = 'group';
static const colId = 'id';
static const colFamily = 'family';
static const colFriends = 'friends';
static const colColleagues = 'colleagues';
static const colAcquaintances = 'acquaintances';
Group({
this.id,
this.family,
this.friends,
this.colleagues,
this.acquaintances,
});
Map toMap() {
var map = {
colFamily: family,
colFriends: friends,
colColleagues: colleagues,
colAcquaintances: acquaintances
};
if (id != null) map[colId] = id;
return map;
}
Group.fromMap(Map map) {
id = map[colId];
family = map[colFamily];
friends = map[colFriends];
colleagues = map[colColleagues];
acquaintances = map[colAcquaintances];
}
}
Your help would be much appreciated.
Thank you in advance, Sir.
thanks.... successfully (y)
Thanks for this amazing video ! What is the name of the font familily your are using in VScode (in this video) ? i really like it :-)
Dank Mono.
@@CodAffection Thanks !
Hi there. Could you tell me what is the best way to provide a db with questions for a quiz app? now i'm using a json file, but i want to develop an app to registrar the questions instead of type one by one in a text editor.
please help error
The following assertion was thrown building:
A non-null String must be provided to a Text widget.
'package:flutter/src/widgets/text.dart':
Failed assertion: line 360 pos 10: 'data != null'
When the exception was thrown, this was the stack:
Please Help me out🙏🏽🙏🏽
While you add the name feona green and thor watson (26:58 min:second of video)...and how we can do first name is thor warson and then feona green?
When we submit new name and phone then the name and phone will be in the top of list and not to submit the new name and phone in the last of list?
What if we want to use UUID as primary key and not autoIncrement
my point 32:50 47:04
You can do all of this in 5 minutes in Delphi Rio. And crossplatform (Windows, Android, iOS, macOS, Linux) /
Why dont you make the eduvideo and shows us rather than just gloating🙄
my Model class is not working?
the constructor with a named parameter is showing me error and asking me to have a required keyword in front
return await products.length ==0
? []
: products.map((e) => Product.fromMap(e)).toList();
I am getting error in this line as
error: The argument type 'Map' can't be assigned to the parameter type 'Map'. (argument_type_not_assignable at [ajay_kirana] lib\database_helper\database_helper.dart:51)
plesase give me sugestion
did u get the answer?
Hi, I am also beginner in flutter, i solved it by changing the Contact.fromMap(Map map) in contact.dart to Contact.fromMap(Map map).
sir I have followed your tutorial step by step but still I can't get rid of exception handling
[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: Stack Overflow
#0 _CustomZone.registerCallback (dart:async/zone.dart:1110:3)
#1 _CustomZone.bindCallbackGuarded (dart:async/zone.dart:1036:22)
#2 _rootScheduleMicrotask (dart:async/zone.dart:1252:16)
#3 _CustomZone.scheduleMicrotask (dart:async/zone.dart:1147:19)
#4 Future._asyncCompleteError (dart:async/future_impl.dart:592:11)
#5 _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:49:15)
#6 DatabaseHelper.database (package:sqlite_crud1/utils/database_helper.dart)
#7 DatabaseHelper.database (package:sqlite_crud1/utils/database_helper.dart:21:9)
#8 DatabaseHelper.database (package:sqlite_crud1/utils/database_helper.dart:21:9)
#9 DatabaseHelper.database (package:sqlite_crud1/utils/database_helper.dart:21:9)
#10 DatabaseHelper.database (package:sqlite_crud1/utils/database_helper.dart:21:9)
#11 DatabaseHelper.database (package:sqlite_crud1/utils/database_helper.dart:21:9)
#1
[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: NoSuchMethodError: The method 'query' was called on null.
Receiver: null
Tried calling: query("contacts")
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 DatabaseHelper.fetchContacts (package:sqlite_crud1/utils/database_helper.dart:59:32)
#2 _MyHomePageState._refreshContactList (package:sqlite_crud1/main.dart:122:37)
#3 _MyHomePageState.initState (package:sqlite_crud1/main.dart:57:5)
#4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4792:57)
#5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4629:5)
#6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3595:14)
#7 Element.updateChild (package:flutter/src/widgets/framework.dart:3360:18)
#8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6144:14)
#9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:
I am getting error
NoSuchMethidError: The method 'touppercase' was called on null.
Reciver: null
Tired calling:touppercase().
Kindly tell me how to solve this error sir?
Hello sir without scaffolding crud operation banao asp.net MVC EntityFramework please sir
@54:32 doesnt show the contacts in the list.. dont get any error. please help
Please create one page crud operation with php mysql in flutter......like this..,
At 31.57 I am not able to make named constructor plz help anybody
Getting error : RangeError (index): Invalid value: Valid value range is empty: 0
Any Suggestion to resolve this error ?
what is the name of the font used in the editor ?
Sorry im new, but fetchContacs returned error Unhandled Exception: type 'String' is not a subtype of type 'int', therefor app doesnot show me list of contacts.
He used string type even for mobile number.
Dear Kindly share the main.dart code
Please Give Intro
If you watch this please watch previous video
Submit ke bad card nahi ban raha hai...
I am facing the same problem. did you fix it ?
@@aashishchaudhary8028 if you are not able to find the problem, then again write the code...all will be well automatically...
I did so...
But I want to say to all developers that if you don't have time to solve the problems of others then don't make such videos until or unless you going to teach...becuase the folllower who follow your video along is the learner and assumes youself a teacher and the teacher has always plenty of rooms available to solve problems but it's a misfortune that you are mare a coder or developer not a teacher, these are untrained or learners that do a mistake to assume yourself a teacher....
@@ramendrasoni3368 can you share your GitHub link?
@@silentkiller4091 bahut din bad aaye aap? Maine sahi kar liya...
Code ka link