ResponsiveSpacing extension

Extension for converting units and handling responsive sizing based on device dimensions.

on

Properties

cm → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to centimeters (cm).
no setter
dp → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to density-independent pixels (dp) for consistent sizing across devices.
no setter
inches → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to inches (in).
no setter
mm → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to millimeters (mm).
no setter
pc → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to picas (pc), where 1 pica = 1/6 inch.
no setter
Q → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to quarter-millimeters (Q).
no setter
sh → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to points (pt), where 1 pt = 1/72 inch. double get pt => this * inches / 72; Converts the value to pixels (px). Default unit. Converts the value to a percentage of the available height after SafeArea.
no setter
spa → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to scalable pixels (spa) with an alternate formula.
no setter
sw → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to a percentage of the available width after SafeArea.
no setter
vmax → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to a percentage of the viewport's larger dimension (height/width).
no setter
vmin → double

Available on num, provided by the ResponsiveSpacing extension

Converts the value to a percentage of the viewport's smaller dimension (height/width).
no setter