unit_transformer 1.0.1+2  unit_transformer: ^1.0.1+2 copied to clipboard
unit_transformer: ^1.0.1+2 copied to clipboard
Unit converting library
Unit_Transformer #
Unit converting library. #
Hecho en 🇵🇷 por Radamés J. Valentín Reyes #
#Import package
import 'package:unit_transformer/conversion_units.dart';
import 'package:unit_transformer/transformer.dart';
Length #
convertLength(
  length: 150, 
  from: LengthUnit.centimeters, 
  to: LengthUnit.feet,
);
Volume #
convertVolume(
  volume: 50, 
  from: VolumeUnit.quartsUS, 
  to: VolumeUnit.cubicFeet,
);
Weight and mass #
convertMassOrWeight(
  massOrWeight: 1, 
  from: WeightOrMassUnit.longTonsUK, 
  to: WeightOrMassUnit.dekagrams,
);
Temperature #
convertTemperature(
  temperature: 1, 
  from: TemperatureUnit.kelvin, 
  to: TemperatureUnit.celsius,
);
Energy #
convertEnergy(
  energy: 1, 
  from: EnergyUnit.britishThermalUnits, 
  to: EnergyUnit.joules,
);
Pressure #
convertPressure(
  pressure: 15, 
  from: PressureUnit.kilopascals, 
  to: PressureUnit.milimitersOfMercury,
);
Speed #
convertSpeed(
  speed: 1, 
  from: SpeedUnit.mach, 
  to: SpeedUnit.metersPerSecond,
);
Power #
convertPower(
  power: 2, 
  from: PowerUnit.horsepowerUS, 
  to: PowerUnit.watts,
);
