fromEntity static method

Future<DocumentItemModel?> fromEntity(
  1. String documentID,
  2. DocumentItemEntity? entity
)

Implementation

static Future<DocumentItemModel?> fromEntity(
    String documentID, DocumentItemEntity? entity) async {
  if (entity == null) return null;
  return DocumentItemModel(
    documentID: documentID,
    reference: entity.reference,
  );
}