Width that keeps the given aspectRatio for height.
aspectRatio
height
static double widthForHeight(double height, double aspectRatio) { if (aspectRatio <= 0) return height; return height * aspectRatio; }