submission method
Creates a lazily initialized SubmissionRef.
id
is the fullname ID of the submission without the ID prefix
(i.e., t3_).
url
is the URL to the submission.
Only one of id
and url
can be provided.
Implementation
SubmissionRef submission({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 SubmissionRef.withID(this, id);
}
return SubmissionRef.withPath(this, (url is Uri) ? url.toString() : url);
}