isQualified property

  1. @override
bool get isQualified
override

Return true if this identifier is the "name" part of a prefixed identifier or a method invocation.

Implementation

@override
bool get isQualified {
  final parent = this.parent!;
  if (parent is PrefixedIdentifier) {
    return identical(parent.identifier, this);
  } else if (parent is PropertyAccess) {
    return identical(parent.propertyName, this);
  } else if (parent is ConstructorName) {
    return identical(parent.name, this);
  } else if (parent is MethodInvocation) {
    MethodInvocation invocation = parent;
    return identical(invocation.methodName, this) &&
        invocation.realTarget != null;
  }
  return false;
}