getContentBySlug method

  1. @override
Future<PublicDeskDocument> getContentBySlug(
  1. String documentType,
  2. String slug
)
override

Implementation

@override
Future<PublicDeskDocument> getContentBySlug(
    String documentType, String slug) async {
  for (final d in _published) {
    if (d.documentType == documentType && d.slug == slug) return d;
  }
  throw StateError('No published document for "$documentType" / "$slug".');
}