getColumnMainAxisAlignment method

dynamic getColumnMainAxisAlignment(
  1. dynamic gravity
)

Implementation

getColumnMainAxisAlignment(gravity) {
  var mainAxisAlignment = MainAxisAlignment.start;
  switch (gravity) {
    case Gravity.bottom:
    case Gravity.leftBottom:
    case Gravity.rightBottom:
      mainAxisAlignment = MainAxisAlignment.end;
      break;
    case Gravity.top:
    case Gravity.leftTop:
    case Gravity.rightTop:
      mainAxisAlignment = MainAxisAlignment.start;
      break;
    case Gravity.left:
      mainAxisAlignment = MainAxisAlignment.center;
      break;
    case Gravity.right:
      mainAxisAlignment = MainAxisAlignment.center;
      break;
    case Gravity.center:
    default:
      mainAxisAlignment = MainAxisAlignment.center;
      break;
  }
  return mainAxisAlignment;
}