@@ -404,7 +404,7 @@ abstract class ModelElement extends Canonicalization
404404
405405 @override
406406 late final bool isPublic = () {
407- if (name == '' ) {
407+ if (name.isEmpty ) {
408408 return false ;
409409 }
410410 if (this is ! Library && (library == null || ! library! .isPublic)) {
@@ -417,7 +417,7 @@ abstract class ModelElement extends Canonicalization
417417 ! (enclosingElement as Extension ).isPublic) {
418418 return false ;
419419 }
420- return utils.hasPublicName (element! ) && ! hasNodoc! ;
420+ return utils.hasPublicName (element! ) && ! hasNodoc;
421421 }();
422422
423423 @override
@@ -543,7 +543,7 @@ abstract class ModelElement extends Canonicalization
543543 if (this is Inheritable && ! config.linkToRemote) {
544544 if ((this as Inheritable ).isInherited &&
545545 _canonicalLibrary == null &&
546- packageGraph.publicLibraries! .contains (library)) {
546+ packageGraph.publicLibraries.contains (library)) {
547547 // In the event we've inherited a field from an object that isn't
548548 // directly reexported, we may need to pretend we are canonical for
549549 // this.
@@ -553,7 +553,7 @@ abstract class ModelElement extends Canonicalization
553553 _canonicalLibraryIsSet = true ;
554554 }
555555 assert (_canonicalLibrary == null ||
556- packageGraph.publicLibraries! .contains (_canonicalLibrary));
556+ packageGraph.publicLibraries.contains (_canonicalLibrary));
557557 return _canonicalLibrary;
558558 }
559559
0 commit comments