toStartGradientPosition function

StartGradientPosition toStartGradientPosition(
  1. int? index
)

Implementation

StartGradientPosition toStartGradientPosition(int? index) {
  switch (index) {
    case 0:
      return StartGradientPosition.topLeft;
    case 1:
      return StartGradientPosition.topCenter;
    case 2:
      return StartGradientPosition.topRight;
    case 3:
      return StartGradientPosition.centerLeft;
    case 4:
      return StartGradientPosition.center;
    case 5:
      return StartGradientPosition.centerRight;
    case 6:
      return StartGradientPosition.bottomLeft;
    case 7:
      return StartGradientPosition.bottomCenter;
    case 8:
      return StartGradientPosition.bottomRight;
  }
  return StartGradientPosition.unknown;
}