Skip to content

Can't set default variable value for Data Type parameter in custom functions #6634

@bob-reus

Description

@bob-reus

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

When I create a custom function that takes a Data Type parameter, I can't set a default value when calling that function.

Likewise, I can't set an initial value for a custom Data Type page state. I assume these two issues are related or have the same cause.

Expected Behavior

I expect to be able to set a default value (or initial value for page states) for custom Data Type parameters, just like I can with other types.

Steps to Reproduce

  1. Create custom Data Type
  2. Create custom function that takes this custom Data Type as a parameter
  3. Call custom function in a widget (for example to display the output of the function as text)
  4. Observe that there is no field to set a variable default value

or

  1. Create custom Data Type
  2. Create a new page
  3. Add a page state with the Data Type created in Step 1
  4. Observe there is no field to set an initial value

Reproducible from Blank

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

Bug Report Code (Required)

IT4sl8j1vJN1pbwA1aqJdcBr/TkRJW4iR5EWsct/cxQcB4j4O7QDdeDCRBNvZ72zaH9UHWeZkk4J//THjYXxIcdfPUisbN1/1LlUYBPPbGCtMLaSC7mOfXB5I8VjCmnF0quj2CVCKs12c0IM2nGAPN68Yz6Cf9qOYwx5e6fDbOY=

Visual documentation

A double parameter, which accepts a default variable value:
Image

A custom Datatype parameter, where this field is missing:
Image

An integer page state, where I can set an initial value:
Image

A custom Datetype page state, where this field is missing:
Image

Environment

- FlutterFlow version: v6.3.41 released October 7, 2025
  Flutter version is 3.32.4
- Platform: any

Additional Information

In some cases the datatype isn't available on the first call of the function, which leads to red screens and null check errors.

In the case of page states, this leads to null check errors as well, if I need the page state to have a value on loading the page. Setting a value in an action on page load still leads to a short flash or a null check error related red screen.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions