Thanks it's help me in my mysql grocery project but i have 0 experienced with sqflite any big reason you used sqflite instead of mysql? & please make CRUD Tutorial in sqflite for beginners
sir y wla project gibhub s download n hra r m code same to same yhi likh cka hn jb run krta hon products cart m add n hty r app run menu m build hti jati ha
Brother In this videos when you add item to cart for the first time it says Null check operator used on a null value and do not add item to cart then second time it added and again if you restart the project and add item it gives same error you have not solved this util your 9th (Last video)
NULL CHECK OPERATOR USED ON A NULL VALUE when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine. to solve this update getter _db as follows Future get db async { if (_db != null) { return _db; } _db = await initDatabase(); return _db; }
brother when um click first time add to cart it's don't added to cart and showing error (Null check operator used on a null value)...but 2nd time it's ok,,,,please check it may be you missed it
Brother um check every single line code... In this video 27.05 min very first click add to cart button showing error (null check operator used on a null value) in log..mean cart is already added..But second time it has work..successfully added..except that everything is ok.... Please check it brother...It's kill me,, trying to solve
NULL CHECK OPERATOR USED ON A NULL VALUE when you click for the first time on the Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine. to solve this update getter _db as follows Future get db async { if (_db != null) { return _db; } _db = await initDatabase(); return _db; }
The method 'insert' isn't defined for the type 'DBHelper'. (Documentation) Try correcting the name to the name of an existing method, or defining a method named 'insert'.
Bro am facing a fetal error in dbhelper.insert(Cart()) in product list file and the error is ("The expression doesn't evaluate to a function, so it can't be invoked.") plz suggest me solution for it
@thetechbrotherss OK Bro I'll take code from your git hub. But I were thinking that flutter is upgrading day by day so the error am facing is can be due to Updated version of flutter ? And plz make a separate tutorial on topic of "updation of flutter effect you code "?
errors are this video and fixed to add ======>>>> await dbClient?.insert('cart', cart.toMap(), conflictAlgorithm: ConflictAlgorithm.replace); **remember cart is table
Process remains same but now you need to store the products locally in sql and then need to load data from sql. After that you need to do the same process on adding the product to cart and updating them in product screen and cart screen..
As i said you need to store the data of your product from api local database. Then you need to load the data from local database and display the product. After that perform the same function like i performed in cart.
class CartProvider with ChangeNotifier{ DBHelper db = DBHelper() ; int _counter = 0 ; int get counter => _counter; // here why add this ........ I am following you , your video is so good but in this playlist, you didn't explain properly . You're writing code in a hurry, and it sounds like you're reading what you're writing, with no explanation. Like why it's used, what's the reason behind it, there's no explanation as to how it works which is why I honestly couldn't understand this playlist. Your previous playlists are much better than that. I hope I won't face this problem in the next playlist . but anyway, thank you for your hard work in making videos
NULL CHECK OPERATOR USED ON A NULL VALUE when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine. to solve this update getter _db as follows Future get db async { if (_db != null) { return _db; } _db = await initDatabase(); return _db; }
Please solve this error: Cart( id:index, productId:index.toString(), productName:productName[index].toString(), initialPrice:productPrice[index], producPrice:productPrice[index], quantity:1, unitTag:productUnit[index].toString(), image:productImage[index].toString() ) this is the error:The argument type 'Cart (where Cart is defined in C:\Users\DELL\OneDrive\Documents\flutter\test2\test2\lib\Screens\cart.dart)' can't be assigned to the parameter type 'Cart (where Cart is defined in C:\Users\DELL\OneDrive\Documents\flutter\test2\test2\lib\Screens\cart_model.dart)'. The named parameter 'id' isn't defined.,The named parameter 'productId' isn't defined As the name Cart is similar for both
As error says add missing parameter. Follow tutorial carefully My code with working fine. Every time if you did a mistake make sure you delete the database and than try again. For now delete the app and install it again.
@@thetechbrotherss Bai ak error araha ha *MissingPluginException* ya kaya error ha ?? kasy solve hoga?? Jab ma Add to cart py click karta hu tab ya error dyta ha
On addition of the very first item to the cart there is and error saying "Null check operator used on a null value". Anyone knows how can we solve this problem?
NULL CHECK OPERATOR USED ON A NULL VALUE when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine. to solve this update getter _db as follows Future get db async { if (_db != null) { return _db; } _db = await initDatabase(); return _db; }
Future get db async { if (_db != null) { return _db!; } _db = await initDatabase(); } database_helper.dart file, (db) is show error message; This function has a nullable return type of 'FutureOr', but ends without returning a value. Try adding a return statement, or if no value is ever returned, try changing the return type to 'void'.". please help!!
NULL CHECK OPERATOR USED ON A NULL VALUE when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine. to solve this update getter _db as follows Future get db async { if (_db != null) { return _db; } _db = await initDatabase(); return _db; }
great videos .... useful video ... and properly define ... thanks again
Glad you liked it!, please do subscribe and share within your friend circle.
Thanks it's help me in my mysql grocery project but i have 0 experienced with sqflite any big reason you used sqflite instead of mysql? & please make CRUD Tutorial in sqflite for beginners
Both are same mysql and sql so you can go ahead with this. You can also watch my flutter notes app tutorial with sql.
@@thetechbrotherss Ok, thanks🥰
Can you upload a tutorial of get api of e-commerce using provider and shared preferences as local storage instead of sqlite.
You can watch my tutorials about sql on with notes app on this channel.
In future i will do that.
Thanks Bro Very Nice Explained Videos
thank you share with your friends
Github link provide kr do iska plz
Go to my github and take it
Grete and thanks. but i have an error "Error: Could not find the correct Provider above this", please help me to fixing this error
thanks dear
Welcome 😊, do subscribe and share with your friends
sir y wla project gibhub s download n hra r m code same to same yhi likh cka hn jb run krta hon products cart m add n hty r app run menu m build hti jati ha
Koi issue hoga apko sode par bro it’s working find
@@thetechbrotherss sir jb add to cart kro to ata ha null check operator use on a null value y smj n ari mjhy
Brother In this videos when you add item to cart for the first time it says Null check operator used on a null value and do not add item to cart then second time it added and again if you restart the project and add item it gives same error you have not solved this util your 9th (Last video)
This didn't happen to me while i was creating the video and i have done same way in many projects. I didn't face any issue like this.
App first time run create db then problem solve
check db_helper.dart file await dbClient?.insert() ------------- add ? mark
Cart provider wali file ko check kro may be because of some writing error in mapping error aarha ho
NULL CHECK OPERATOR USED ON A NULL VALUE
when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine.
to solve this update getter _db as follows
Future get db async {
if (_db != null) {
return _db;
}
_db = await initDatabase();
return _db;
}
sir badge to by default ab araha hai lakin ab es ko consumer ki saat kesy wrap krengi plz help
yes kr skty ha
what if we dont make the variables like "counter" private, will it make any difference?
It's in my native language
brother when um click first time add to cart it's don't added to cart and showing error (Null check operator used on a null value)...but 2nd time it's ok,,,,please check it may be you missed it
It’s something you are doing wrong 😑 it works fine you can check the source code on github check description
@@thetechbrotherss in your tutorial doing same thing
Brother um check every single line code...
In this video 27.05 min very first click add to cart button showing error (null check operator used on a null value) in log..mean cart is already added..But second time it has work..successfully added..except that everything is ok....
Please check it brother...It's kill me,, trying to solve
NULL CHECK OPERATOR USED ON A NULL VALUE
when you click for the first time on the Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine.
to solve this update getter _db as follows
Future get db async {
if (_db != null) {
return _db;
}
_db = await initDatabase();
return _db;
}
The method 'insert' isn't defined for the type 'DBHelper'. (Documentation) Try correcting the name to the name of an existing method, or defining a method named 'insert'.
take code from github
Bro Its good that you have make video but no properly explained code just typing the code from seeing somewhere.
I do agree, at that' time i used to not to into depth.
Bro am facing a fetal error in dbhelper.insert(Cart()) in product list file and the error is
("The expression doesn't evaluate to a function, so it can't be invoked.") plz suggest me solution for it
You must be doing something wrong, please check the code on my github to match the code
@thetechbrotherss OK Bro I'll take code from your git hub.
But I were thinking that flutter is upgrading day by day so the error am facing is can be due to Updated version of flutter ?
And plz make a separate tutorial on topic of "updation of flutter effect you code "?
(1) table cart has no column named intialPrice
I/flutter (19653): DatabaseException(table cart has no column named intialPrice (code 1 SQLITE_ERROR): , while compiling: INSERT INTO cart (id, productId, productName, intialPrice, ProductPrice, quantity, unitTag, image) VALUES (?, ?, ?, ?, ?, ?, ?, ?)) sql 'INSERT INTO cart (id, productId, productName, intialPrice, ProductPrice, quantity, unitTag, image) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' args [2, 2, Grapes, 30, 30, 1, KG, how to solve this and not add product to badge
you missed something while watching tutorials
same problem
errors are this video and fixed to add ======>>>> await dbClient?.insert('cart', cart.toMap(),
conflictAlgorithm: ConflictAlgorithm.replace);
**remember cart is table
bhai error ni ha please watch full video and your error will be solved
@@thetechbrotherss wo apke version wala hai aur az ke din dependency version update huwa ho ga bhai
@@thetechbrotherss problem ye hai ki multiple product unit add nai kar sakte
Bhai new version k sath bhi yeah code kam kry ga.
@@thetechbrotherss hn
Because shoppingcart depends on sqflite >=2.0.4-dev.1 which requires SDK version >=2.18.0-0 =2.0.4-dev.1 which requires SDK version >=2.18.0-0
Add latest dependencies
@@thetechbrotherss sqflite >=2.0.4 version old. new version nahi he ab kya kare
brother when i add item to cart its print "Stack Overflow" error how to resolve this
that's insane
@@thetechbrotherss kese resolve kro ye issue what you think kaha ghlto krha ho mey becaz mey product ke jo item usko bi aik model class sey le rha ho
Kindly help me out i will be very thankful
cart icon not visible kya kru ki visible ho pls reply me🙏
please check code on my git, link in description. you must be doing something wrong
sir mein DBHelper dbHelper = DBHelper(); lagta hon tho erroe deta hai sir please help kai kyun horaha hai
Kya error atta ha ap project ko phr sy run kr lain.
R videos please full dekhain mainy error fix kia thy
Good job bro, but we need to update qty if product exists in cart not to show error that item already exists .. how we can ??
Process remains same but now you need to store the products locally in sql and then need to load data from sql. After that you need to do the same process on adding the product to cart and updating them in product screen and cart screen..
@@thetechbrotherss i try with db helper but i cant, can you help
As i said you need to store the data of your product from api local database. Then you need to load the data from local database and display the product. After that perform the same function like i performed in cart.
brother i used the code step by step and it added to sqlite but unable to see any in cart still 0. please help
check source code my github, link in description
@@thetechbrotherss can I have your cell number??
class CartProvider with ChangeNotifier{
DBHelper db = DBHelper() ;
int _counter = 0 ;
int get counter => _counter; // here why add this ........ I am following you , your video is so good but in this playlist, you didn't explain properly . You're writing code in a hurry, and it sounds like you're reading what you're writing, with no explanation. Like why it's used, what's the reason behind it, there's no explanation as to how it works which is why I honestly couldn't understand this playlist. Your previous playlists are much better than that. I hope I won't face this problem in the next playlist . but anyway, thank you for your hard work in making videos
I agree with you, i was new that time. Now my videos are much improved and focus on explaining code
@@thetechbrotherss Thank You
getting error null check operator used on a null value
checkout course on my github username axiftaj
to correct your error
@@thetechbrotherss Thanks
NULL CHECK OPERATOR USED ON A NULL VALUE
when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine.
to solve this update getter _db as follows
Future get db async {
if (_db != null) {
return _db;
}
_db = await initDatabase();
return _db;
}
Please solve this error: Cart( id:index, productId:index.toString(), productName:productName[index].toString(), initialPrice:productPrice[index], producPrice:productPrice[index], quantity:1, unitTag:productUnit[index].toString(), image:productImage[index].toString() ) this is the error:The argument type 'Cart (where Cart is defined in C:\Users\DELL\OneDrive\Documents\flutter\test2\test2\lib\Screens\cart.dart)' can't be assigned to the parameter type 'Cart (where Cart is defined in C:\Users\DELL\OneDrive\Documents\flutter\test2\test2\lib\Screens\cart_model.dart)'. The named parameter 'id' isn't defined.,The named parameter 'productId' isn't defined
As the name Cart is similar for both
As error says add missing parameter.
Follow tutorial carefully
My code with working fine. Every time if you did a mistake make sure you delete the database and than try again.
For now delete the app and install it again.
please do videos in English
I am not good at speaking in english
Bai mujay code ni mil raha ha github pay kindly link bata dyna
Search kro mil jay ga
@@thetechbrotherss Bai ak error araha ha *MissingPluginException* ya kaya error ha ?? kasy solve hoga??
Jab ma Add to cart py click karta hu tab ya error dyta ha
On addition of the very first item to the cart there is and error saying "Null check operator used on a null value". Anyone knows how can we solve this problem?
Getting the same error... please help
When the value is null on the variable and when you are fetching the same null variable with null check operator it show this type of error.
NULL CHECK OPERATOR USED ON A NULL VALUE
when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine.
to solve this update getter _db as follows
Future get db async {
if (_db != null) {
return _db;
}
_db = await initDatabase();
return _db;
}
Future get db async {
if (_db != null) {
return _db!;
}
_db = await initDatabase();
}
database_helper.dart file,
(db) is show error message;
This function has a nullable return type of 'FutureOr', but ends without returning a value.
Try adding a return statement, or if no value is ever returned, try changing the return type to 'void'.". please help!!
Watch video carefully till end uninstall the app then reinstall it
NULL CHECK OPERATOR USED ON A NULL VALUE
when you click for the first time on Add to cart button it will show - "Null check operator used on a null value". But for the second time it will work fine.
to solve this update getter _db as follows
Future get db async {
if (_db != null) {
return _db;
}
_db = await initDatabase();
return _db;
}
Manz can speak English but decides to speak his language 😭😭wish you knew how much we depend on Indian tutors on youtube you guys got no idea hey
Oh mate i can feel you and promise i will try my best to make videos in English in future.
@@thetechbrotherss thank you so much the first comment I was just angry. Not to spread hate but just disappointed since I looked forward to it