PowerUnit enum

Represents units of power.

This enum implements the Unit interface to provide conversion capabilities and a display symbol for each power unit. All conversion factors are pre-calculated in the constructor relative to the Watt (W).

Inheritance
Implemented types
Available extensions

Values

watt → const PowerUnit

Watt (W), the SI derived unit of power, equal to one Joule per second.

const PowerUnit(1, 'W')
milliwatt → const PowerUnit

Milliwatt (mW), a sub-multiple of the Watt, common in electronics.

const PowerUnit(PowerFactors.wattsPerMilliwatt, 'mW')
kilowatt → const PowerUnit

Kilowatt (kW), a common multiple of the Watt.

const PowerUnit(PowerFactors.wattsPerKilowatt, 'kW')
megawatt → const PowerUnit

Megawatt (MW), a common multiple of the Watt, used for large-scale power.

const PowerUnit(PowerFactors.wattsPerMegawatt, 'MW')
gigawatt → const PowerUnit

Gigawatt (GW), a multiple of the Watt, used for large power plants.

const PowerUnit(PowerFactors.wattsPerGigawatt, 'GW')
horsepower → const PowerUnit

Mechanical Horsepower (hp), a common unit for engine and motor power.

const PowerUnit(PowerFactors.wattsPerHorsepower, 'hp')
metricHorsepower → const PowerUnit

Metric Horsepower (PS), used commonly in the automotive industry.

const PowerUnit(PowerFactors.wattsPerMetricHorsepower, 'PS')
btuPerHour → const PowerUnit

British Thermal Unit per hour (Btu/h), common in HVAC.

const PowerUnit(PowerFactors.wattsPerBtuPerHour, 'Btu/h')
ergPerSecond → const PowerUnit

Erg per second (erg/s), the power unit in the CGS system.

const PowerUnit(PowerFactors.wattsPerErgPerSecond, 'erg/s')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
The human-readable symbol for this power unit (e.g., "W", "kW", "hp").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<PowerUnit>
A constant List of the values in this enum, in order of their declaration.