getOffset function

Offset getOffset(
  1. LightSourcePosition lightSourcePosition
)

Implementation

Offset getOffset(LightSourcePosition lightSourcePosition) {
  if(lightSourcePosition == LightSourcePosition.TOP_LEFT) {
      return Offset(4.0, 4.0);
  } else if(lightSourcePosition == LightSourcePosition.TOP) {
    return Offset(0.0, 4.0);
  } else if(lightSourcePosition == LightSourcePosition.TOP_RIGHT) {
    return Offset(-4.0, 4.0);
  } else if(lightSourcePosition == LightSourcePosition.RIGHT) {
    return Offset(-4.0, 0.0);
  } else if(lightSourcePosition == LightSourcePosition.BOTTOM_RIGHT) {
    return Offset(-4.0, -4.0);
  } else if(lightSourcePosition == LightSourcePosition.BOTTOM) {
    return Offset(0.0, -4.0);
  } else if(lightSourcePosition == LightSourcePosition.BOTTOM_LEFT) {
    return Offset(4.0, -4.0);
  } else if(lightSourcePosition == LightSourcePosition.LEFT) {
    return Offset(4.0, 0.0);
  } else {
    return Offset(0.0, 0.0);
  }
}