Pressure class final

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
Available extensions
Annotations
  • @immutable

Constructors

Pressure(double _value, PressureUnit _unit)
Creates a new Pressure quantity with the given value and unit.
const
Pressure.from(Force force, Area area)
Creates a Pressure from force and area (P = F / A).
factory

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
asGPa Pressure

Available on Pressure, provided by the PressureValueGetters extension

Returns a Pressure representing this pressure in Gigapascals (GPa).
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
asSoundPressureLevel SoundPressureLevel

Available on Pressure, provided by the PressureSoundPressureLevelBridge extension

Alias for toSoundPressureLevel.
no setter
asTorr Pressure

Available on Pressure, provided by the PressureValueGetters extension

Returns a Pressure representing this pressure in Torrs (Torr).
no setter
asUPa Pressure

Available on Pressure, provided by the PressureValueGetters extension

Returns a Pressure representing this pressure in Micropascals (µPa).
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
inGPa double

Available on Pressure, provided by the PressureValueGetters extension

Returns the pressure value in Gigapascals (GPa).
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
inUPa double

Available on Pressure, provided by the PressureValueGetters extension

Returns the pressure value in Micropascals (µPa).
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

areaFor(Force force) Area
Calculates the Area over which a given Force is distributed to exert this pressure (A = F / P).
compareTo(Quantity<PressureUnit> other) int
Compares this quantity to another Quantity of the same type (T).
inherited
convertTo(PressureUnit targetUnit) Pressure
Creates a new Q instance with the value converted to targetUnit.
inherited
create(double value, PressureUnit unit) Pressure
Factory that creates a new instance of the concrete subtype Q.
override
getValue(PressureUnit targetUnit) double
Returns the value of this quantity converted to targetUnit.
inherited
isEquivalentTo(Quantity<PressureUnit> other, {double tolerance = 1e-9, double absoluteTolerance = 0.0}) bool
Checks if this quantity has the same physical magnitude as another, accounting for IEEE 754 floating-point rounding inaccuracies.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ratioTo(Quantity<PressureUnit> other) double
Computes the dimensionless ratio of this quantity to other.
inherited
toSoundPressureLevel() SoundPressureLevel

Available on Pressure, provided by the PressureSoundPressureLevelBridge extension

Converts this pressure to a sound pressure level.
toString({PressureUnit? targetUnit, QuantityFormat format = QuantityFormat.invariant}) String
Returns a string representation of this quantity.
inherited

Operators

operator *(double scalar) Pressure
Multiplies this quantity by a dimensionless scalar.
inherited
operator +(Pressure other) Pressure
Adds other to this quantity.
inherited
operator -(Pressure other) Pressure
Subtracts other from this quantity.
inherited
operator /(double scalar) Pressure
Divides this quantity by a dimensionless scalar.
inherited
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
operator unary-() Pressure
Negates this quantity.
inherited

Static Properties

parser QuantityParser<PressureUnit, Pressure>
The parser instance used to convert strings into Pressure objects.
final

Static Methods

parse(String input, {List<QuantityFormat> formats = const [QuantityFormat.invariant]}) Pressure
Parses a string representation of pressure into a Pressure object.
tryParse(String input, {List<QuantityFormat> formats = const [QuantityFormat.invariant]}) Pressure?
Parses a string representation of pressure into a Pressure object, returning null when parsing fails.