@@ -38,23 +38,22 @@ class Parameter extends ModelElement with HasNoPage {
38
38
@override
39
39
String get htmlId {
40
40
final enclosingElement = element.enclosingElement;
41
- if (enclosingElement != null ) {
42
- var enclosingName = enclosingElement.name;
43
- if (enclosingElement is GenericFunctionTypeElement ) {
44
- // TODO(jcollins-g): Drop when GenericFunctionTypeElement populates
45
- // name. Also, allowing null here is allowed as a workaround for
46
- // dart-lang/sdk#32005.
47
- for (Element e = enclosingElement;
48
- e.enclosingElement != null ;
49
- e = e.enclosingElement! ) {
50
- enclosingName = e.name;
51
- if (enclosingName != null && enclosingName.isNotEmpty) break ;
52
- }
53
- }
54
- return '$enclosingName -param-$name ' ;
55
- } else {
41
+ if (enclosingElement == null ) {
56
42
return 'param-$name ' ;
57
43
}
44
+ var enclosingName = enclosingElement.name;
45
+ if (enclosingElement is GenericFunctionTypeElement ) {
46
+ // TODO(jcollins-g): Drop when GenericFunctionTypeElement populates
47
+ // name. Also, allowing null here is allowed as a workaround for
48
+ // dart-lang/sdk#32005.
49
+ for (Element e = enclosingElement;
50
+ e.enclosingElement != null ;
51
+ e = e.enclosingElement! ) {
52
+ enclosingName = e.name;
53
+ if (enclosingName != null && enclosingName.isNotEmpty) break ;
54
+ }
55
+ }
56
+ return '$enclosingName -param-$name ' ;
58
57
}
59
58
60
59
@override
0 commit comments