Flutter Shopping Cart With Provider with null safety Part - 5 || Add To Cart, Update Count And Price

Flutter Shopping Cart With Provider with null safety Part - 5 || Add To Cart, Update Count And Price

The Tech Brothers

2 года назад

23,107 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Hamza
Hamza - 30.09.2023 13:07

what if we dont make the variables like "counter" private, will it make any difference?

Ответить
Aamir Khan
Aamir Khan - 03.09.2023 14:25

brother i used the code step by step and it added to sqlite but unable to see any in cart still 0. please help

Ответить
MUSIC LOVERS..
MUSIC LOVERS.. - 27.08.2023 14:23

cart icon not visible kya kru ki visible ho pls reply me🙏

Ответить
Rocky
Rocky - 26.08.2023 21:56

sir badge to by default ab araha hai lakin ab es ko consumer ki saat kesy wrap krengi plz help

Ответить
Jasmin Thapa
Jasmin Thapa - 12.06.2023 18:27

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

Ответить
Nipuna Thalpage
Nipuna Thalpage - 22.02.2023 14:23

please do videos in English

Ответить
Sameer Ali
Sameer Ali - 03.02.2023 19:38

Thanks Bro Very Nice Explained Videos

Ответить
Mujahid shah
Mujahid shah - 24.01.2023 11:30

(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

Ответить
Mujahid shah
Mujahid shah - 19.01.2023 13:13

Because shoppingcart depends on sqflite >=2.0.4-dev.1 which requires SDK version >=2.18.0-0 <3.0.0, version solving failed.
pub get failed (1; Because shoppingcart depends on sqflite >=2.0.4-dev.1 which requires SDK version >=2.18.0-0 <3.0.0, version solving failed.). how to solve this error

Ответить
Usman Asghar
Usman Asghar - 22.11.2022 14:09

Bro Its good that you have make video but no properly explained code just typing the code from seeing somewhere.

Ответить
Sudhanshu jha
Sudhanshu jha - 30.10.2022 17:12

Github link provide kr do iska plz

Ответить
usman speaks
usman speaks - 26.09.2022 15:48

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

Ответить
Snow White
Snow White - 21.09.2022 15:55

Future<Database?> 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<Database?>', but ends without returning a value.\nTry adding a return statement, or if no value is ever returned, try changing the return type to 'void'.". please help!!

Ответить
Zafran Hazarvi
Zafran Hazarvi - 19.09.2022 15:07

Bai mujay code ni mil raha ha github pay kindly link bata dyna

Ответить
Mas Coder.
Mas Coder. - 12.09.2022 13:17

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

Ответить
enamul haque
enamul haque - 22.08.2022 08:48

Grete and thanks. but i have an error "Error: Could not find the correct Provider<Cartprovider> above this", please help me to fixing this error

Ответить
pydrive
pydrive - 13.08.2022 13:30

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?

Ответить
Rashid Ali
Rashid Ali - 08.07.2022 18:30

brother when i add item to cart its print "Stack Overflow" error how to resolve this

Ответить
SnopCat Developer
SnopCat Developer - 03.07.2022 18:36

errors are this video and fixed to add ======>>>> await dbClient?.insert('cart', cart.toMap(),
conflictAlgorithm: ConflictAlgorithm.replace);


**remember cart is table

Ответить
Abdul Rafay
Abdul Rafay - 27.04.2022 15:03

Can you upload a tutorial of get api of e-commerce using provider and shared preferences as local storage instead of sqlite.

Ответить
Muhammad Anus
Muhammad Anus - 12.02.2022 14:08

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

Ответить
java language
java language - 26.12.2021 12:35

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)

Ответить
Shahab Zaheer
Shahab Zaheer - 24.12.2021 17:24

great videos .... useful video ... and properly define ... thanks again

Ответить
Shahab Zaheer
Shahab Zaheer - 23.12.2021 14:38

thanks dear

Ответить
Naufil Ahmed
Naufil Ahmed - 28.11.2021 19:25

sir mein DBHelper dbHelper = DBHelper(); lagta hon tho erroe deta hai sir please help kai kyun horaha hai

Ответить
ajmal aslam
ajmal aslam - 30.10.2021 12:19

lib/productlist.dart:116:31: Warning: Operand of null-aware operation '!' has type 'DBHelper' which excludes null.
- 'DBHelper' is from 'package:mycart/db/db_helper.dart' ('lib/db/db_helper.dart').
dbHelper!.insert(Cart(

Ответить
OZA and SINO
OZA and SINO - 25.10.2021 21:13

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 ??

Ответить