blob: 6ac327a584b15554e95e5bb4b9f4e0c38f482dcf [file] [log] [blame]
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/dart/ast/ast.dart';
extension NamedTypeExtension on NamedType {
String get qualifiedName {
final importPrefix = this.importPrefix;
if (importPrefix != null) {
return '${importPrefix.name.lexeme}.${name.lexeme}';
} else {
return name.lexeme;
}
}
}