Skip to content

Some widgets' nullOk parameters are inconsistently applied. #68637

@shyndman

Description

@shyndman

The Actions widget has a number of static methods with a nullOk parameter, which can be used to enable or disable the throwing of errors when the caller's requested object was not found.

Turns out, this parameter is only considered when asserts are enabled. This feels a little iffy to me, as the documentation makes no mention of how the contract can change depending on environment.

Request: Improve docs (and maybe the name of the param, since it's sort of a debug only thing), or alternatively normalize behavior between asserts-enabled and disabled builds.

Affected methods:

  • Actions.find
  • Actions.of
  • Actions.handler
  • Actions.invoke

Thanks!

@gspencergoog

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: error messageError messages from the Flutter frameworkd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions