isToListMethod property

bool get isToListMethod

Return true if this element represents the method toList from Iterable.

Implementation

bool get isToListMethod {
  if (name != 'toList') {
    return false;
  }
  final definingClass = enclosingElement;
  if (definingClass is! ClassElement) {
    return false;
  }
  return definingClass.isDartCoreIterable;
}