childByDocumentType method

GenericDocument? childByDocumentType(
  1. String name
)

Returns a sub-document given its document type name. Returns null if not found.

Implementation

GenericDocument? childByDocumentType(String name) {
  return children.firstWhereOrNull((element) => element.type.name == name);
}