isEnabled property

  1. @override
bool isEnabled
override

Whether or not this chip is enabled for input.

If this is true, but all of the user action callbacks are null (i.e. SelectableChipAttributes.onSelected, TappableChipAttributes.onPressed, and DeletableChipAttributes.onDeleted), then the control will still be shown as disabled.

This is typically used if you want the chip to be disabled, but also show a delete button.

For classes which don't have this as a constructor argument, isEnabled returns true if their user action callback is set.

Defaults to true.

Implementation

@override
bool get isEnabled => onPressed != null;