fromEntity static method

Future<PolicyPresentationModel?> fromEntity(
  1. String documentID,
  2. PolicyPresentationEntity? entity
)

Implementation

static Future<PolicyPresentationModel?> fromEntity(
    String documentID, PolicyPresentationEntity? entity) async {
  if (entity == null) return null;
  return PolicyPresentationModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    conditions: await StorageConditionsModel.fromEntity(entity.conditions),
  );
}