onDeleted property

VoidCallback onDeleted
final

Called when the user taps the deleteIcon to delete the chip.

If null, the delete button will not appear on the chip.

The chip will not automatically remove itself: this just tells the app that the user tapped the delete button. In order to delete the chip, you have to do something similar to the following sample:

This sample shows how to use onDeleted to remove an entry when the delete button is tapped.
To create a local project with this code sample, run:
flutter create --sample=chip.DeletableChipAttributes.onDeleted.1 mysample

Implementation

final VoidCallback onDeleted