BoxShadow.offset defines the direction in which the shadow is moved. It takes an Offset(dx, dy) object as a value. Where dx is offset by the x-axis and dy is offset by the y-axis.
Offset(0, 0):
No offset. The source of light is above the center of the container.
Offset(20, 0):
dx = 20. Shadow moved to the right 20px. The source of light is on the left side.
Offset(-20, 0):
dx = -20. Shadow moved to the left 20px. The source of light is on the right side.
Offset(0, 20):
dy = 20. I don’t see the logic here. Why the y-axis is directed down? If positive dx moves the shadow to the right, then positive dy should move the shadow up. But ok, we have what we have.
Offset(0, -20):
Offset(-20, -20):