getSize static method
Implementation
static double? getSize(UnitValue? unitValue, double space) {
final real = unitValue?.type == UnitType.PERCENT ? null : unitValue?.value;
final percent = unitValue?.type == UnitType.PERCENT ? unitValue?.value : null;
if (real != null) return real.toDouble();
if (percent != null) return (percent.toDouble() / 100) * space;
}