comment method
Creates a lazily initialized CommentRef.
id
is the fullname ID of the comment without the ID prefix
(i.e., t1_).
url
is the URL to the comment.
Only one of id
and url
can be provided.
Implementation
CommentRef comment({String? id, /* Uri, String */ url}) {
if ((id != null) && (url != null)) {
throw DRAWArgumentError('One of either id or url can be provided');
} else if ((id == null) && (url == null)) {
throw DRAWArgumentError('id and url cannot both be null');
} else if (id != null) {
return CommentRef.withID(this, id);
}
return CommentRef.withPath(this, (url is Uri) ? url.toString() : url);
}