applyInternal method

  1. @override
bool applyInternal(
  1. String applyType,
  2. AFWidgetSelector selector,
  3. Element element,
  4. dynamic data,
)
override

Note that data is ignored, this toggles the chip state.

Implementation

@override
bool applyInternal(String applyType, AFWidgetSelector selector, Element element, dynamic data) {
  final widget = element.widget;
  if(widget is ChoiceChip) {
    widget.onSelected?.call(!widget.selected);
    return true;
  }
  return false;
}