roundPixels function

String roundPixels(
  1. double val,
  2. Unit? unit
)

Round pixels values to 1 decimal point max.

Implementation

String roundPixels(double val, Unit? unit) {
  return '${truncate(val, 1)}${unit?.xmlValue ?? Unit.px}';
}