size is the size of the image when displayed
size
Offset toResizedOffset(Size size) => Offset(x.toDouble() * size.width, y.toDouble() * size.height);