mainAxisResolver function

dynamic mainAxisResolver(
  1. String value
)

Implementation

mainAxisResolver(String value) {
  // justify-content
  // mainAxisAlignment:  "center|start|end|spaceBetween|spaceAround|spaceEvenly" [MainAxisAlignment],
  if (value == 'center') return MainAxisAlignment.center;
  if (value == 'flex-start') return MainAxisAlignment.start;
  if (value == 'flex-end') return MainAxisAlignment.end;
  if (value == 'space-between') return MainAxisAlignment.spaceBetween;
  if (value == 'space-around') return MainAxisAlignment.spaceAround;
  if (value == 'space-evenly') return MainAxisAlignment.spaceEvenly;

  throw Exception('mainAxisAlignment: $value is not supported');
}