fromEntity static method

Future<BodyComponentModel?> fromEntity(
  1. String documentID,
  2. BodyComponentEntity? entity
)

Implementation

static Future<BodyComponentModel?> fromEntity(
    String documentID, BodyComponentEntity? entity) async {
  if (entity == null) return null;
  return BodyComponentModel(
    documentID: documentID,
    componentName: entity.componentName,
    componentId: entity.componentId,
  );
}