FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

Remove/add from List at Index not working. #4052

Open buildthick opened 1 month ago

buildthick commented 1 month ago

Can we access your project?

Current Behavior

I'm using ListView's "generate children from variable" functionality so users can add/delete specific items from an unbound list. The number of items is based on appstate variable list of integers. However, the "remove from list at index" and "insert at index" functions simply add/delete from the end of the list and not at the index.

This problem was also reported here and never resolved: https://github.com/FlutterFlow/flutterflow-issues/issues/3067

Expected Behavior

"Remove from list at index" should delete specific list item, not only delete the last item in the list. "Insert at index" should add list item wherever desired, not only add an item to the end of the list.

Steps to Reproduce

  1. Set appstate variable integer list, e.g "numberOfItems"
  2. Create a listview in builder
  3. Add container under listview, insert text widget for visibility, insert button icon with X, insert button icon with +
  4. Navigate to listview's Generating Children from Variable
  5. Name the variable "ItemNumber"
  6. Set value to Appstate -> Map List Items -> Item in List
  7. Find X button icon, define action -> update appstate -> Set field as "numberOfItems" appstate variable -> "Remove from List at Index"
  8. Find + button icon, define action -> update appstate -> Set field as "numberOfItems" appstate variable -> "Insert at index"
  9. Run Test Mode
  10. Observe that X and + button only delete and add items to end of list, respectively

Reproducible from Blank

Bug Report Code (Required)

IT4Wz8r15ZVNj7xa15DucsJanSQRNlw1bZZNmsNxTQE3F4urOowPXfnRalhoTN+idGNqL2H8kmYew9KNuNn2A+UnEzGBbL5a1LlcWj3jUnOiMrKOPLmRdHEmLNxJJVyg5JmC2yVCOtZiL1IM2U6qBuzISXfXHu/LPVUSDciJEK/Ao12pQ0SLb3kNh1JWeC/v

Visual documentation

https://jmp.sh/hDgKz4c1

Jumpshare link of videoˆ

Environment

- FlutterFlow version: FlutterFlow v5.0.6+ released October 12, 2024 Flutter version is 3.22.2
- Platform: Web
- Browser name and version: Firefox 131.0.2
- Operating system and version affected: MacOS Sequoia 15

Additional Information

Without this functionality I cannot develop the app. Dynamic user input is required to fulfill promised results, and I cannot preset a number of items because it varies greatly by user.

buildthick commented 1 month ago

Hey Paul, happy to exchange with you and to jump on a call if needed. Feel free to contact me via email. I suspect this is impacting anyone using shopping carts based on listview, and users effectively cannot manage their cart.

buildthick commented 4 weeks ago

Hello, any updates?

buildthick commented 3 weeks ago

Hello, any updates from FlutterFlow team?

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

Alezanello commented 2 weeks ago

Hello,

I apologize for the late response. Does this issue still persist, or was it fixed in the latest FlutterFlow updates?

noahgomz commented 2 weeks ago

Yes, the problem persists.

noahgomz commented 1 week ago

Hello, the problem persists. Could you please address it?

TimothyWCTI commented 1 week ago

Chiming in to mention I'm also encountering this. I have abandoned features due to this issue.