getAlignment method

Alignment? getAlignment()

Implementation

Alignment? getAlignment() {
  if (alignItems == null && justifyContent == null) {
    return null;
  }

  var x = -1.0;
  var y = -1.0;
  if (flexDirection == FlexCSSDirection.row) {
    x = _getAlignmentValue(alignItems);
    y = _getAlignmentValue(justifyContent);
  } else {
    y = _getAlignmentValue(alignItems);
    x = _getAlignmentValue(justifyContent);
  }

  return Alignment(x, y);
}