fromEntity static method

Future<AssignmentViewModel?> fromEntity(
  1. String documentID,
  2. AssignmentViewEntity? entity
)

Implementation

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