hasMethod method

bool hasMethod(
  1. String method
)

Whether this enum value defines a bridged instance method (or operator) named method. Mirrors the lookup order used by invoke so callers (e.g. the interpreter's binary/unary operator dispatch) can probe for a bridged operator method — such as the &, |, ~ overloads on Flutter's WidgetState — before falling back to the built-in operator handling.

Implementation

bool hasMethod(String method) =>
    _methods.containsKey(method) || enumType.methods.containsKey(method);