Skip to content

undefined name 'kDebugMode' #1953

@sarim

Description

@sarim

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

Visibility -> Code Expression -> kDebugMode
shows the error undefined name 'kDebugMode'

Expected Behavior

No error. Widget visible when in debug mode.

Steps to Reproduce

  1. In a widgets properties click visibility -> conditional
  2. Select code expression
  3. kDebugMode as body
  4. click check error button

Reproducible from Blank

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

Bug Report Code (Required)

N/A

Context

In the app sometimes its necessary to have widgets / functionality for developers eyes only. Suppose a button that only rendered in debug mode.

Visual documentation

image

Additional Info

I also tried creating a function and return kDebugMode inside it. But in function I can't add import foundation for kDebugMode.

Potentially consider adding "Is Debug Mode" in Global Properties
image

Environment

- FlutterFlow version: v4.0 Dec 2, 2023
- Platform: Web
- Browser name and version: Edge 119.0.2151.93
- Operating system and version affected: Windows 11

Metadata

Metadata

Labels

Type

No type
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