isPublic property

bool isPublic
override

Implementation

@override
bool get isPublic {
  if (_isPublic == null) {
    if (name == '') {
      _isPublic = false;
    } else if (this is! Library && (library == null || !library.isPublic)) {
      _isPublic = false;
    } else if (enclosingElement is Class &&
        !(enclosingElement as Class).isPublic) {
      _isPublic = false;
    } else if (enclosingElement is Extension &&
        !(enclosingElement as Extension).isPublic) {
      _isPublic = false;
    } else {
      _isPublic = utils.hasPublicName(element) && !hasNodoc;
    }
  }
  return _isPublic;
}