From 2f73a775799846abba5d53c1a5226f8e013405a8 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 30 Apr 2024 15:16:59 -0700 Subject: [PATCH] Privatize ModelCommentReference.codeRef and .parsed --- .../model_comment_reference.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/src/comment_references/model_comment_reference.dart b/lib/src/comment_references/model_comment_reference.dart index 960923e5c9..8d83fc6e1e 100644 --- a/lib/src/comment_references/model_comment_reference.dart +++ b/lib/src/comment_references/model_comment_reference.dart @@ -9,21 +9,21 @@ import 'package:dartdoc/src/comment_references/parser.dart'; /// A stripped down analyzer AST [CommentReference] containing only that /// information needed for Dartdoc. class ModelCommentReference { - final String codeRef; + final String _codeRef; bool get hasCallableHint => - parsed.isNotEmpty && - ((parsed.length > 1 && parsed.last.text == 'new') || - parsed.last is CallableHintEndNode); + _parsed.isNotEmpty && + ((_parsed.length > 1 && _parsed.last.text == 'new') || + _parsed.last is CallableHintEndNode); - List get referenceBy => parsed + List get referenceBy => _parsed .whereType() .map((i) => i.text) .toList(growable: false); /// Constructs a [ModelCommentReference] given a raw string. - ModelCommentReference(this.codeRef); + ModelCommentReference(this._codeRef); - late final List parsed = - CommentReferenceParser(codeRef).parse(); + late final List _parsed = + CommentReferenceParser(_codeRef).parse(); }