fromEntity static method

Future<BlockingDashboardModel?> fromEntity(
  1. String documentID,
  2. BlockingDashboardEntity? entity
)

Implementation

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