Skip to content

The documentation of Flexible.flex mention null even if the type is non nullable #158085

@ValentinVignal

Description

@ValentinVignal

Steps to reproduce

/// The flex factor to use for this child.
///
/// If null or zero, the child is inflexible and determines its own size. If
/// non-zero, the amount of space the child can occupy in the main axis is
/// determined by dividing the free space (after placing the inflexible
/// children) according to the flex factors of the flexible children.
final int flex;

The documentation says "If null or zero", but it cannot be null.

Expected results

The documentation should only mention "If zero"

Actual results

The documentation mentions "If null or zero"

Code sample

Code sample

NA

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    d: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions