byIndex static method

double byIndex(
  1. int index
)

Get spacing value by scale index

Implementation

static double byIndex(int index) {
  switch (index) {
    case 0:
      return none;
    case 1:
      return xs;
    case 2:
      return sm;
    case 3:
      return md;
    case 4:
      return lg;
    case 5:
      return xl;
    case 6:
      return xxl;
    case 7:
      return xxxl;
    default:
      // For indices beyond defined scale, use proportional scaling
      return sm * index;
  }
}