FlutterFlow / flutterflow-issues

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

Empty list widget property dose not work #4931

Open 12138zhen opened 2 days ago

12138zhen commented 2 days ago

Can we access your project?

Current Behavior

After setting the emptyListWidget property for a ListView, the code does not reflect the corresponding changes. The emptyListWidget is correctly configured in the UI, but it doesn’t seem to take effect in the implementation.

Expected Behavior

When the emptyListWidget property is set for a ListView, I expect the widget to display properly when the list is empty. The corresponding changes should be reflected in the code, and the empty state widget should appear as configured.

Steps to Reproduce

  1. Add a ListView widget to the HomePage.
  2. Run the following SQL command to create a new database table:
    CREATE TABLE "test" (
    "id"    INTEGER,
    "name"  TEXT,
    "type"  TEXT,
    PRIMARY KEY("id" AUTOINCREMENT)
    );

    leave the table empty

  3. Configure the SQL query in the backend as shown in the attached screenshot. Screenshot 2024-11-20 at 9 42 03 PM
  4. set the sqlite query as ListView backend
  5. create a component which is only a text widget, and set the component as Empty list widget Screenshot 2024-11-20 at 9 46 24 PM
  6. Launch the app locally. You will observe that the ListView is empty with no components rendered. my test:ITESz/Hqx89gruUD16rQdcZAhQIhNmY1bZMnktVxRR4dC5SsP5ktPsn7YUNKQuGgeVViI2ekgT80w+DPveDtUsE6HzurGd1l0JVAQwnJRlOXbpCtPKu0RXF6HdFjC3bG0bu3vhRdKs91LFYO2l6lNa3qNleeY8aSfxBlZ7vfcPo=

Reproducible from Blank

Bug Report Code (Required)

ITEelcn15Yt1n7xC+s+NaO1aqwMwJHI/auYvte5+d0shNZTtP7QHd87Rfk1LYteifH5Lelaj/U800tLFuODlIe1cOk6ZGqpJzZRXQQ/MXjuiMba4C5OeVnZSQMRhf0yj4baZ2BF+BPpvW3Aj2V7zBvCNG3qCf9qOYwx5e6fDbOY=

Visual documentation

Screenshot 2024-11-19 at 11 50 46 PM Screenshot 2024-11-19 at 11 51 32 PM

Environment

- FlutterFlow version: 5.0.12
- Platform: MacOS Desktop
- Operating system and version affected: macOS 15.1

Additional Information

No response

Alezanello commented 2 days ago

Hello!

I was unable to replicate this issue on my end, which suggests it may be specific to your project. Have you tried removing the component and adding it back? Additionally, could you attempt to replicate the issue in a new blank project? This will help determine if it is indeed a project-specific problem.

My test: https://app.flutterflow.io/project/q-a-3077-kq7719

12138zhen commented 1 day ago

Hello @Alezanello

Thank you for your response. Unfortunately, I am unable to access the project link you provided. I have already tried removing and re-adding the component, but it did not resolve the issue.

Additionally, I was able to reproduce the problem in a new blank project. I have updated my issue report with detailed steps to reproduce the problem. Please take a look and let me know if you need further information or clarification.

Thank you!

12138zhen commented 1 day ago

Hello @Alezanello

I attempted to open the test link you provided again. Upon closer inspection, I noticed that your test uses a list variable as the data source for the ListView. In my case, however, the data source is an SQLite database. This difference seems to be the key factor triggering the issue.

Could you please investigate this scenario where SQLite is used as the data source? Let me know if you need further details or clarification!

Thank you!

Alezanello commented 9 hours ago

Hello, I can confirm that this issue occurs only when an SQLite query is applied. I'll escalate this to the engineering team to work on a fix. Thank you for bringing this to our attention!