Volume class
Represents a quantity of volume.
Volume is a derived quantity representing the amount of three-dimensional space occupied by a substance. The SI derived unit is the Cubic Meter (m³).
- Inheritance
-
- Object
- Quantity<
VolumeUnit> - Volume
- Available extensions
- Annotations
-
- @immutable
Constructors
- Volume(double _value, VolumeUnit _unit)
-
Creates a new
Volumequantity with the given numerical value and unit.const
Properties
- asCentiliters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Centiliters (cl).no setter - asCubicCentimeters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Centimeters (cm³).no setter - asCubicDecameters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Decameters (dam³).no setter - asCubicDecimeters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Decimeters (dm³).no setter - asCubicFeet → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Feet (ft³).no setter - asCubicHectometers → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Hectometers (hm³).no setter - asCubicInches → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Inches (in³).no setter - asCubicKilometers → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Kilometers (km³).no setter - asCubicMeters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Meters (m³).no setter - asCubicMiles → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Miles (mi³).no setter - asCubicMillimeters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Cubic Millimeters (mm³).no setter - asFluidOunces → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in US Fluid Ounces (fl-oz).no setter - asGallons → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in US Gallons (gal).no setter - asGigaliters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Gigaliters (Gl).no setter - asKiloliters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Kiloliters (kl).no setter - asLiters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Liters (L).no setter - asMegaliters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Megaliters (Ml).no setter - asMicroliters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Microliters (µL).no setter - asMilliliters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Milliliters (mL).no setter - asPints → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in US Pints (pt).no setter - asQuarts → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in US Quarts (qt).no setter - asTablespoons → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in US Tablespoons (tbsp).no setter - asTeaspoons → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in US Teaspoons (tsp).no setter - asTeraliters → Volume
-
Available on Volume, provided by the VolumeValueGetters extension
Returns a new Volume object representing this volume in Teraliters (Tl).no setter - hashCode → int
-
Returns a hash code for this
Quantityinstance.no setterinherited - inCentiliters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Centiliters (cl).no setter - inCubicCentimeters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Centimeters (cm³).no setter - inCubicDecameters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Decameters (dam³).no setter - inCubicDecimeters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Decimeters (dm³).no setter - inCubicFeet → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Feet (ft³).no setter - inCubicHectometers → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Hectometers (hm³).no setter - inCubicInches → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Inches (in³).no setter - inCubicKilometers → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Kilometers (km³).no setter - inCubicMeters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Meters (m³).no setter - inCubicMiles → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Miles (mi³).no setter - inCubicMillimeters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Cubic Millimeters (mm³).no setter - inFluidOunces → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in US Fluid Ounces (fl-oz).no setter - inGallons → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in US Gallons (gal).no setter - inGigaliters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Gigaliters (Gl).no setter - inKiloliters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Kiloliters (kl).no setter - inLiters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Liters (L).no setter - inMegaliters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Megaliters (Ml).no setter - inMicroliters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Microliters (µL).no setter - inMilliliters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Milliliters (mL).no setter - inPints → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in US Pints (pt).no setter - inQuarts → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in US Quarts (qt).no setter - inTablespoons → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in US Tablespoons (tbsp).no setter - inTeaspoons → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in US Teaspoons (tsp).no setter - inTeraliters → double
-
Available on Volume, provided by the VolumeValueGetters extension
Returns the volume value in Teraliters (Tl).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unit → VolumeUnit
-
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< VolumeUnit> other) → int -
Compares this Volume object to another Quantity<VolumeUnit>.
override
-
convertTo(
VolumeUnit targetUnit) → Volume -
Creates a new Volume instance with the value converted to the
targetUnit.override -
getValue(
VolumeUnit targetUnit) → double -
Converts this volume's value to the specified
targetUnit.override -
isEquivalentTo(
Quantity< VolumeUnit> 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(
{VolumeUnit? 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) → Volume - Multiplies this volume by a scalar value (a dimensionless number).
-
operator +(
Volume other) → Volume - Adds this volume to another volume.
-
operator -(
Volume other) → Volume - Subtracts another volume from this volume.
-
operator /(
double scalar) → Volume - Divides this volume by a scalar value (a dimensionless number).
-
operator <(
Quantity< VolumeUnit> other) → bool -
Checks if this quantity's magnitude is less than another's.
inherited
-
operator <=(
Quantity< VolumeUnit> 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< VolumeUnit> other) → bool -
Checks if this quantity's magnitude is greater than another's.
inherited
-
operator >=(
Quantity< VolumeUnit> other) → bool -
Checks if this quantity's magnitude is greater than or equal to another's.
inherited