resolve method

  1. @override
ChipStyle resolve(
  1. Set<WidgetEvent> events
)
override

Returns a value of type T that depends on events.

Widgets like TextButton and ElevatedButton apply this method to their current WidgetEvents to compute colors and other visual parameters at build time.

Implementation

@override
ChipStyle resolve(Set<WidgetEvent> events) {
  ChipStyle style = this;
  for (var e in driven.entries) {
    if (events.contains(e.key)) {
      final evaluated = evaluate(e.value, events);
      style = mergeResolved != false
          ? style.merge(evaluated)
          : ChipStyle.from(evaluated);
    }
  }
  return style;
}