calculatePosition method

List<double?> calculatePosition(
  1. Alignment alignment
)

Implementation

List<double?> calculatePosition(Alignment alignment) {
  double? left, right, top, bottom;
  if (alignment == Alignment.topLeft) {
    left = 0;
  } else if (alignment == Alignment.topRight) {
    right = 0;
  } else if (alignment == Alignment.bottomLeft) {
    bottom = 0;
  } else if (alignment == Alignment.bottomRight) {
    right = 0;
    bottom = 0;
  }
  return [left, right, top, bottom];
}