Skip to content

Add documentation to DropdownMenu.onSelected and add appropriate type constraints #175090

@LongCatIsLooong

Description

@LongCatIsLooong

https://main-api.flutter.dev/flutter/material/DropdownMenu/onSelected.html

The callback is called when a selection is made.

Defaults to null. If null, only the text field is updated.

Upon reading the field / class docs, it does not tell me what null represents in T? and when I would get null in the callback.

Also since null seems to have a special meaning to the DropdownMenu implementation, the class needs an additional type constraint: T extends Object so the user can't assign a different meaning to null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterd: api docsIssues with https://api.flutter.dev/f: gesturesflutter/packages/flutter/gestures repository.f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions