Skip to content

Unexpected Behaviour on passing empty list as paramters #6639

@ansh-kaushik

Description

@ansh-kaushik

Can we access your project?

  • 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

See, i have 2 pages , dashboard page , and a statement page ,
on dashboard i click on icon button -> do action(with output from supabase) if it returns an empty array
and then i pass that array as paramter to the next page it crashes ,

Expected Behavior

I dug deep into code and found out , the serialization of paramters is the problem ,

Image FF serialize parameters before navigating to next page but if a paramter is empty it returns null like serializeParam([]) = NULL which idk is expected or what but here it breaks two things 1) initilization of the next page state variables 2)If there is any loop on that parameter on that next page it breaks (error: unepxected null value ) cause it expects an empty to some size array which should be there but not its null so the loop actions break, whiout any problem

Steps to Reproduce

0))connect to supabase and a simple table (like todo/messages)
1)Create two pages
2) on first add a button -> add action (on tap) -> query rows(query as such there is empty array, like willingly make it empty )
3) on 2nd page add the paramter of that type suapbase table (as LIST) and let's say iterate a for loop on that page (loop actions (all default) ) for anything(render/assign/etc)
4) notice it will give error if list is empty

Note: U can verify in Debugger in local run , before naivagating and having a watch on variables(parameter one)

Reproducible from Blank

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

Bug Report Code (Required)

IT40iMjfsI52ocMA+KrpbfpR/SQ5JkAjR5IZjsBraCwqGJToPLUMPsneVFRuZr2lYXx9MWCKkTo0xvfqjvOWG/FcPUmbbKI9/7lUdg7jVkSmMISnCpGNfW1RL8JXfky5yraOnhNSGNVvLy0W7GC1fu+UfB7bK7rxIW0vLfK1KdeK2SrDX1iXc2URm05KZDPz

Visual documentation

Image

Environment

- FlutterFlow version: Latest
- Platform:Android
- Browser name and version:Chrome Latest
- Operating system and version affected:Windows 11

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions