Skip to content

Page parameter with required Document Reference generates widget!.param! causing TypeErrorImpl crash on page build #7284

Description

@mcnutt-dev

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 a page has a required Document Reference page parameter, FlutterFlow generates widget!.alertRef! in the page widget file. This causes a TypeErrorImpl: Unexpected null value crash during the page's initial build() call, before any widget tree is rendered. Presumably due to a timing error when fetching the data.

Expected Behavior

Should generate widget?.alertRef (null-safe) instead of widget!.alertRef! to prevent crashes during page initialization.

Steps to Reproduce

  1. Create a page with a required Document Reference page parameter

  2. Place a component on the page that accepts that same parameter

  3. Navigate to the page from a ListView row tap (passing the document reference)

  4. Page crashes immediately with TypeErrorImpl: Unexpected null value

Required Document Reference page parameter → passed into a component on that same page (also required) → generates widget!.param! → crashes

Reproducible from Blank

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

Bug Report Code (Required)

IT40ks/lvJNPm8tD+KX6cfkwmik5Jlg8ROca0tVRaCsofePrOpkAf8/7UFtUcMfkYwhqOU6KnnoX/MnGkuDpFsEFAyidb7pHyJFyQwvMJUS6bKawO763b2tBP8VNFWaC1rSnvhBTIstqL2w91GCyPfC9SgHfH6bKDm4FP+a4XdeK2SrDX1iXc2URm05KZDPz

Visual documentation

Image Image Image Image

Environment

- FlutterFlow version: v7.0.23 (released July 10, 2026)
- Platform: WindowsOS Desktop
- Browser name and version: App 
- Operating system and version affected: Windows OS (3.38.6)

Additional Information

In April of 2023, a similar bug was reported under issue #760. The June 2023 fix for Issue #760 only addressed currentUserDocument — not the broader pattern of page parameters generating unsafe ! operators.

#760

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions