getStartPositon method

double getStartPositon(
  1. dynamic cardWidth
)

Implementation

double getStartPositon(cardWidth) {
  double position = 0;

  switch (align) {
    case ALIGN.LEFT:
      position = 0;
      break;
    case ALIGN.CENTER:
      position = (cardViewPagerWidth! / 2) - (cardWidth / 2);
      break;
    case ALIGN.RIGHT:
      position = cardViewPagerWidth! - cardWidth;
      break;
  }

  return position;
}