Skip to content

FilterChip should have DeletableChipAttributes/trailing to match Material 3 spec. #135595

@Jonas-Sander

Description

@Jonas-Sander

Is there an existing issue for this?

Use case

I'm trying to present several filters that a user can choose from, like shown here in the material 3 spec.

Additionally the user should be able to create more filter with a custom value. These custom filters should be deletable. Such a filter chip with the "X" symbol is shown in the material 3 spec right here.

Note: In the last link the description says: "[...] filter chips may contain a trailing icon to directly remove the chip [...]" but subtext beneath the illustration says: "The X close icon indicates that a user can unselect the filter chip". I'm very sure "unselect" is wrong and should be replaced with "delete", since one can already unselect by tapping on the chip and as the "X" means deleting on other chip types.

Proposal

Add DeletableChipAttributes to FilterChip.

Note: As there is also an example with a "trailing menu item" maybe there should be a trailing attribute instead of only onDeleted etc? But as _RawChip specifically mentions deleteIcon I'm not sure if this would require a refactoring of other chip types as well.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: 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

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions