GenericDocumentWrapper constructor

GenericDocumentWrapper(
  1. GenericDocument document
)

Implementation

GenericDocumentWrapper(this.document) {
  if (document.type.name != requiredDocumentType) {
    throw ArgumentError(
        'Invalid document type. Expected: $requiredDocumentType, got: ${document.type.name}');
  }
}