isDeferred property

  1. @override
bool isDeferred
override

Return true if this type is a deferred type. If the AST structure has not been resolved, then return false.

15.1 Static Types: A type T is deferred iff it is of the form p.T where p is a deferred prefix.

Implementation

@override
bool get isDeferred {
  Element? element = _prefix.staticElement;
  if (element is PrefixElement) {
    final imports = element.imports;
    if (imports.length != 1) {
      return false;
    }
    return imports[0].prefix is DeferredImportElementPrefix;
  }
  return false;
}