isAssignableFrom method

bool isAssignableFrom(
  1. Element element
)

Returns true if the type of element can be assigned to this type.

Implementation

bool isAssignableFrom(Element element) =>
    isExactly(element) ||
    (element is InterfaceElement && element.allSupertypes.any(isExactlyType));