ControlPosition$cast function

ControlPosition? ControlPosition$cast(
  1. dynamic value
)

Implementation

ControlPosition? ControlPosition$cast(value) {
  if (value == ControlPosition.BOTTOM_CENTER)
    return ControlPosition.BOTTOM_CENTER;
  if (value == ControlPosition.BOTTOM_LEFT) return ControlPosition.BOTTOM_LEFT;
  if (value == ControlPosition.BOTTOM_RIGHT)
    return ControlPosition.BOTTOM_RIGHT;
  if (value == ControlPosition.LEFT_BOTTOM) return ControlPosition.LEFT_BOTTOM;
  if (value == ControlPosition.LEFT_CENTER) return ControlPosition.LEFT_CENTER;
  if (value == ControlPosition.LEFT_TOP) return ControlPosition.LEFT_TOP;
  if (value == ControlPosition.RIGHT_BOTTOM)
    return ControlPosition.RIGHT_BOTTOM;
  if (value == ControlPosition.RIGHT_CENTER)
    return ControlPosition.RIGHT_CENTER;
  if (value == ControlPosition.RIGHT_TOP) return ControlPosition.RIGHT_TOP;
  if (value == ControlPosition.TOP_CENTER) return ControlPosition.TOP_CENTER;
  if (value == ControlPosition.TOP_LEFT) return ControlPosition.TOP_LEFT;
  if (value == ControlPosition.TOP_RIGHT) return ControlPosition.TOP_RIGHT;
  return null;
}