Area class

Represents the two-dimensional derived unit of perpendicular distances.

Inheritance

Constructors

Area.infinite()
Infinite area.
const
Area.negativeInfinite()
Infinite negative area.
const
Area.of(Distance a, Distance b)
Constructs an Area from component parts.
Area.ofSquareCentimeters(num squareCentimeters, {Precision precision = Precision.max})
Area.ofSquareFeet(num squareFeet, {Precision precision = Precision.max})
Area.ofSquareInches(num squareInches, {Precision precision = Precision.max})
Area.ofSquareKilometers(num squareKilometers, {Precision precision = Precision.max})
Area.ofSquareMeters(num squareMeters, {Precision precision = Precision.max})
Area.ofSquareMiles(num squareMiles, {Precision precision = Precision.max})
Area.ofSquareMillimeters(num squareMillimeters, {Precision precision = Precision.max})
Area.ofSquareYards(num squareYards, {Precision precision = Precision.max})
Area.sum(Iterable<Area> parts, {Precision precision = Precision.max})
Constructs an Area representing the sum of any number of other Areas.
Area.zero()
Represents an area of size zero.
const

Properties

asSquareCentimeters double
no setter
asSquareFeet double
no setter
asSquareInches double
no setter
asSquareKilometers double
no setter
asSquareMeters double
no setter
asSquareMiles double
no setter
asSquareMillimeters double
no setter
asSquareYards double
no setter
hashCode int
The hash code for this object.
no setterinherited
isFinite bool
Returns true if this measurement is finite.
no setterinherited
isInfinite bool
Returns true if this measurement is infinite (either positive or negative).
no setterinherited
isNaN bool
Returns true if this measurement cannot be expressed as a number.
no setterinherited
isNegative bool
Returns true if this measurement is negative.
no setterinherited
precision int
Returns the number of digits of precision this measurement has.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
si double
The SI value this measurement is based on.
finalinherited

Methods

acceptVisitor(MeasurementVisitor visitor) → void
Accept a visitor object for double-dispatch.
override
as(DistanceInterpreter a, DistanceInterpreter b) double
Interprets this in the specified units.
asArea(AreaInterpreter a) double
Interprets this in the specified area
compareMagnitude(Area other) double
Returns the difference in magnitude between this and another measurement.
inherited
compareTo(Area other) int
Compares this object to another object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
withPrecision(Precision precision) Area
Creates an equivalent measurement with the specified precision.
inherited

Operators

operator *(double multiplier) Area
Returns a measurement equivalent to a multiple of this.
inherited
operator +(Area other) Area
Returns a measurement equivalent to the sum of two others.
inherited
operator -(Area other) Area
Returns a measurement equivalent to the difference between two others.
inherited
operator /(double divisor) Area
Returns a measurement equivalent to a fraction of this.
inherited
operator <(Area other) bool
Returns true if this is less than the other measurement.
inherited
operator <=(Area other) bool
Returns true if this is less than or equal to the other measurement.
inherited
operator ==(dynamic other) bool
The equality operator.
inherited
operator >(Area other) bool
Returns true if this is greater than the other measurement.
inherited
operator >=(Area other) bool
Returns true if this is greater than or equal to the other measurement.
inherited
operator unary-() Area
Returns a measurement representing the opposite of this.
inherited
operator ~/(Area other) int
Returns the truncating division result of this and another measurement.
inherited

Static Methods

square(DistanceInterpreter distanceInterpreter) AreaInterpreter
Produces an interpreter for the square of a provided distance interpreter.