Skip to content

Commit 2cc3dc7

Browse files
committed
Remove friendlyNameForElement from utils
Not used
1 parent 4fcc2e0 commit 2cc3dc7

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

lib/src/utils.dart

-33
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,6 @@ import 'package:analyzer/dart/element/type.dart';
77
import 'package:build/build.dart';
88
import 'package:path/path.dart' as p;
99

10-
String friendlyNameForElement(Element element) {
11-
var friendlyName = element.displayName;
12-
13-
if (friendlyName == null) {
14-
throw new ArgumentError(
15-
'Cannot get friendly name for $element - ${element.runtimeType}.');
16-
}
17-
18-
var names = <String>[friendlyName];
19-
if (element is ClassElement) {
20-
names.insert(0, 'class');
21-
if (element.isAbstract) {
22-
names.insert(0, 'abstract');
23-
}
24-
}
25-
if (element is VariableElement) {
26-
names.insert(0, element.type.toString());
27-
28-
if (element.isConst) {
29-
names.insert(0, 'const');
30-
}
31-
32-
if (element.isFinal) {
33-
names.insert(0, 'final');
34-
}
35-
}
36-
if (element is LibraryElement) {
37-
names.insert(0, 'library');
38-
}
39-
40-
return names.join(' ');
41-
}
42-
4310
/// Returns a non-null name for the provided [type].
4411
///
4512
/// In newer versions of the Dart analyzer, a `typedef` does not keep the

0 commit comments

Comments
 (0)