Height that keeps the given aspectRatio for width.
aspectRatio
width
static double heightForWidth(double width, double aspectRatio) { if (aspectRatio <= 0) return width; return width / aspectRatio; }