Skip to content

Passing sqlite row as page parameter results in null values #2389

@AndreReginattoPoupante

Description

@AndreReginattoPoupante

Has your issue been reported?

  • I have searched the existing issues and confirm it has not been reported.
  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

When passing a sqlite row as page parameter results in null values.

Expected Behavior

When passing a sqlite row as page parameter, the second page should get the parameter

Steps to Reproduce

  1. Create two pages
  2. Create a list view in page 1
  3. Attach a sqlite query to the list view in page 1
  4. Add a button to list view
  5. On tap of button navigate to page 2 passing the sqlite row as page parameter for page 2
  6. Define the page parameter as sqlite row in page 2 to accept the incoming data
  7. Create a text field on page 2 to display the incoming data and set the text property to one of the columns of the incoming row

result:

The incoming data in page 2 will be null and fall back to the default value

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

Got and error: Failure to copy to clipboard: PlatformException(copy_fail, Clipboard.setData failed, null, null)

Context

I was trying to edit a sqlite row, but couldn't get the current data on the edit page.

Visual documentation

When clicking "Editar categoria"("Edit category") goes to the edit page without the data of the category to edit

Screenshot_2024-02-26-09-31-44-320_com parable poupante

Screenshot_2024-02-26-09-31-48-182_com parable poupante

Additional Info

I could resolve this issue on my code by adding the type of the sqlite row on the params.getParam.

This is the code I got from Flutter Flow:

Screenshot 2024-02-26 at 09 12 18

This is my code that worked, I just added SelectCategoriesIsDefaultRow Type to the getParam:

Screenshot 2024-02-26 at 09 13 59

I noticed that the issue is on deserializeParam, that is inside the getParam.
Inside the deserializeParam, on the case ParamType.SqliteRow, the code checks the type of class T, but it doesn't had a type.

Screenshot 2024-02-26 at 09 16 07

As the "T" did not have a type, the code passed directly and the parameter was always null.
I passed the sqlite row type and it worked.
Of course, maybe this isn't the right way to solve it, but this is as far as I managed to get and it solved the problem.

Environment

- FlutterFlow version: 4.1
- Platform: Web
- Browser name and version: Safari, Version 17.2.1 (19617.1.17.11.12)
- Operating system and version affected: macOS Sonoma 14.2.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions