Pressure class
Represents a quantity of pressure.
Pressure is a fundamental physical quantity, defined as force per unit area. This class provides a type-safe way to handle pressure values and conversions between different units of pressure.
- Inheritance
-
- Object
- Quantity<
PressureUnit> - Pressure
- Available extensions
- Annotations
-
- @immutable
Constructors
- Pressure.new(double value, PressureUnit unit)
-
Creates a new Pressure quantity with the given
value
andunit
.const
Properties
- asAtm → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Atmospheres (atm).no setter - asBar → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Bars (bar).no setter - asCmH2O → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Centimeters of Water (cmH₂O).no setter - asHPa → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Hectopascals (hPa).no setter - asInH2O → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Inches of Water (inH₂O).no setter - asInHg → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Inches of Mercury (inHg).no setter - asKiloPascals → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Kilopascals (kPa).no setter - asMbar → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Millibars (mbar).no setter - asMegaPascals → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Megapascals (MPa).no setter - asMmHg → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Millimeters of Mercury (mmHg).no setter - asPa → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Pascals (Pa).no setter - asPsi → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Pounds per Square Inch (psi).no setter - asTorr → Pressure
-
Available on Pressure, provided by the PressureValueGetters extension
Returns a Pressure representing this pressure in Torrs (Torr).no setter - hashCode → int
-
Returns a hash code for this
Quantity
instance.no setterinherited - inAtm → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Atmospheres (atm).no setter - inBar → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Bars (bar).no setter - inCmH2O → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Centimeters of Water (cmH₂O) at 4°C.no setter - inHPa → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Hectopascals (hPa).no setter - inInH2O → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Inches of Water (inH₂O) at 4°C.no setter - inInHg → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Inches of Mercury (inHg).no setter - inKiloPascals → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Kilopascals (kPa).no setter - inKPa → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Kilopascals (kPa).no setter - inMbar → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Millibars (mbar).no setter - inMegaPascals → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Megapascals (MPa).no setter - inMmHg → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Millimeters of Mercury (mmHg).no setter - inPa → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Pascals (Pa).no setter - inPsi → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Pounds per Square Inch (psi).no setter - inTorr → double
-
Available on Pressure, provided by the PressureValueGetters extension
Returns the pressure value in Torrs (Torr).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unit → PressureUnit
-
Returns the unit of measurement associated with this quantity's original value.
no setterinherited
- value → double
-
Returns the numerical value of this quantity in its original unit.
no setterinherited
Methods
-
compareTo(
Quantity< PressureUnit> other) → int -
Compares this Pressure object to another Quantity<PressureUnit>.
override
-
convertTo(
PressureUnit targetUnit) → Pressure -
Creates a new Pressure instance with the value converted to the
targetUnit
.override -
getValue(
PressureUnit targetUnit) → double -
Converts this pressure's value to the specified
targetUnit
.override -
isEquivalentTo(
Quantity< PressureUnit> other) → bool -
Checks if this quantity has the same physical magnitude as another.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
{PressureUnit? targetUnit, int? fractionDigits, bool showUnitSymbol = true, String unitSymbolSeparator = '\u00A0', String? locale, NumberFormat? numberFormat}) → String -
Returns a string representation of this quantity, with options for
formatting and unit conversion.
inherited
Operators
-
operator *(
double scalar) → Pressure - Multiplies this pressure by a scalar value. Returns a new Pressure instance with the scaled value in the original unit.
-
operator +(
Pressure other) → Pressure -
Adds this pressure to another pressure.
The
other
pressure is converted to the unit of this pressure before addition. Returns a new Pressure instance with the result in the unit of this pressure. -
operator -(
Pressure other) → Pressure -
Subtracts another pressure from this pressure.
The
other
pressure is converted to the unit of this pressure before subtraction. Returns a new Pressure instance with the result in the unit of this pressure. -
operator /(
double scalar) → Pressure - Divides this pressure by a scalar value. Returns a new Pressure instance with the scaled value in the original unit. Throws ArgumentError if scalar is zero.
-
operator <(
Quantity< PressureUnit> other) → bool -
Checks if this quantity's magnitude is less than another's.
inherited
-
operator <=(
Quantity< PressureUnit> other) → bool -
Checks if this quantity's magnitude is less than or equal to another's.
inherited
-
operator ==(
Object other) → bool -
Determines whether this Quantity is equal to another Object.
inherited
-
operator >(
Quantity< PressureUnit> other) → bool -
Checks if this quantity's magnitude is greater than another's.
inherited
-
operator >=(
Quantity< PressureUnit> other) → bool -
Checks if this quantity's magnitude is greater than or equal to another's.
inherited