Skip to content

FlutterFlow Dropdown Widget - initialOption: code generated has a null safety miss match #535

@masterboltdev

Description

@masterboltdev

Issue tracker is ONLY used for reporting bugs. New feature suggestions and questions should be discussed on Community or submitted through our user feedback form.

Your issue may already be reported! Please search in the issue tracker before creating one.

Please thumbs up this issue if you have also experienced it. You may also add more information if there is something relevant that was not mentioned. However, please refrain from comments that are not constructive, like "I have this problem too", etc.

Expected behavior (required)

[code generated]
initialOption: _model.categoryDropDownValueMap[listViewBroadcastsRecord] ??=
listViewBroadcastsRecord.category,

[fixed code]
initialOption: _model.categoryDropDownValueMap[listViewBroadcastsRecord] ??=
listViewBroadcastsRecord.category!,
or
initialOption: _model.categoryDropDownValueMap[listViewBroadcastsRecord] ??=
listViewBroadcastsRecord.category as String,

any datatype using Null Safety is affected.

Current behavior (required)

erroneous code generated, though not identified as an error in the builder

To Reproduce (required)

ITESz/Hqx89goulA+ZCAYO5qhQInOUA5apAvlOsbFB4dfIjsPIoEPODBU0NKT7ybemxYAGD+mmM0wfDtjeHhUcAoOQqVY4RSk/UwKlCvHAM=

Context (required)

once fixed the current value of the document will be selected in the dropdown. Temporarily, I'm just not setting it

Screenshots / recordings

ss2

Your environment

  • Version of FlutterFlow used:
  • flutterflow 3.1
  • Platform (e.g. Web, MacOS Desktop):
  • Web
  • Browser name and version:
  • Chrome 110.0.5481.177
  • Operating system and version (desktop or mobile):
    Windows 11 Desktop

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions