PowerUnit enum

Represents units of power.

This enum implements the LinearUnit 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')
nanowatt → const PowerUnit

Nanowatt (nW), used in semiconductor sleep-state power profiling.

const PowerUnit(PowerFactors.wattsPerNanowatt, 'nW')
microwatt → const PowerUnit

Microwatt (µW), critical for IoT devices and RFID.

const PowerUnit(PowerFactors.wattsPerMicrowatt, 'µ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')
terawatt → const PowerUnit

Terawatt (TW), standard scale for global energy consumption.

const PowerUnit(PowerFactors.wattsPerTerawatt, 'TW')
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
isMetric bool
Returns false for the imperial horsepower and btuPerHour, the CGS ergPerSecond, and metricHorsepower ("metric" in name only — defined via kgf·m/s, not an SI unit); true for all decimal multiples/submultiples of the watt.
no setteroverride
isSI bool
Returns true only for watt, the SI derived unit of power.
no setteroverride
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.