matchDirection method

void matchDirection(
  1. List<ImageDirectionModel> value
)

Implementation

void matchDirection(List<ImageDirectionModel> value) {
  front.value = null;
  leftFront.value = null;
  rightFront.value = null;
  leftBack.value = null;
  back.value = null;
  rightBack.value = null;
  for (ImageDirectionModel direction in value) {
    if (direction.directionSlug == CarPartDirectionEnum.front.excelId) {
      front.value = direction;
    } else if (direction.directionSlug ==
        CarPartDirectionEnum.leftFront.excelId) {
      leftFront.value = direction;
    } else if (direction.directionSlug ==
        CarPartDirectionEnum.rightFront.excelId) {
      rightFront.value = direction;
    } else if (direction.directionSlug ==
        CarPartDirectionEnum.leftBack.excelId) {
      leftBack.value = direction;
    } else if (direction.directionSlug == CarPartDirectionEnum.back.excelId) {
      back.value = direction;
    } else if (direction.directionSlug ==
        CarPartDirectionEnum.rightBack.excelId) {
      rightBack.value = direction;
    }
  }
}