computeChildOffset method
Computes the child's paint offset based on the alignment.
Implementation
@override
Offset computeChildOffset(Offset parentOffset, Size childSize) {
final double x = parentOffset.x +
(size!.width - childSize.width) * (alignment.x + 1) / 2;
final double y = parentOffset.y +
(size!.height - childSize.height) * (alignment.y + 1) / 2;
return Offset(x.round(), y.round());
}