dvStudioDocumentFor function
DVStudioDocument
dvStudioDocumentFor(
- DVStudioTarget target, {
- required String mount,
- required DVStudioProjectData data,
- List<
DVStudioModelSpec> models = const <DVStudioModelSpec>[],
The document for target: the object it names where the project has one,
and its screen otherwise.
An object nobody has is not an error. A link somebody wrote by hand, or a list that has changed since it was printed, opens the screen rather than answering "no such thing" -- the screen is a real page and a 404 for a name Studio cannot resolve makes a stale bookmark look like a broken Studio.
Implementation
DVStudioDocument dvStudioDocumentFor(
DVStudioTarget target, {
required String mount,
required DVStudioProjectData data,
List<DVStudioModelSpec> models = const <DVStudioModelSpec>[],
bool navigation = true,
}) {
final DVStudioDocument? object = target.object.isEmpty
? null
: _objectDocument(
target,
mount: mount,
data: data,
models: models,
navigation: navigation,
);
return object ??
_screenDocument(target, mount: mount, data: data, navigation: navigation);
}