isSatisfiedBy method

  1. @override
bool isSatisfiedBy(
  1. Set<WidgetState> states
)
override

Whether the provided states satisfy this object's criteria.

If the constraint is a single WidgetState object, it's satisfied by the set if the set contains the object.

The constraint can also be created using one or more operators, for example:

final WidgetStatesConstraint constraint = WidgetState.focused | WidgetState.hovered;

In the above case, constraint.isSatisfiedBy(states) is equivalent to:

states.contains(WidgetState.focused) || states.contains(WidgetState.hovered);

Implementation

@override
bool isSatisfiedBy(Set<WidgetState> states) => states.contains(this);