getMainAxisAlignment function

MainAxisAlignment getMainAxisAlignment(
  1. String alignemnt
)

Implementation

MainAxisAlignment getMainAxisAlignment(String alignemnt) {
  switch (alignemnt) {
    case 'center':
      return MainAxisAlignment.center;
    case 'start':
      return MainAxisAlignment.start;
    case 'end':
      return MainAxisAlignment.end;
    case 'spaceAround':
      return MainAxisAlignment.spaceAround;
    case 'spaceBetween':
      return MainAxisAlignment.spaceBetween;
    case 'spaceEvenly':
      return MainAxisAlignment.spaceEvenly;
    default:
      return MainAxisAlignment.start;
  }
}