currentDocumentType property
Computed: resolves the slug to a DocumentType object.
Implementation
late final currentDocumentType = Computed<DocumentType?>(() {
final slug = currentDocumentTypeSlug.value;
if (slug == null) return null;
try {
return documentTypes.firstWhere((dt) => dt.name == slug);
} catch (_) {
return null;
}
}, debugLabel: 'currentDocumentType');