vmin property

double vmin

vmin - percent of smallest between width or height of viewport

If our viewport is 1440px wide and 800px tall, and if we set element to have a width of 50.vmin, it’ll be 50% of the height (400px). When the viewport is resized the value is recalculated.

Implementation

double get vmin {
  return this / 100.0 * (_screenSize?.shortestSide ?? 100.0);
}