Area class

An area Measurement - for example 55.67m².

To create a new Area object, use any of this class's factory constructors. For example,

Area plotArea = Area.fromHectares(20.0);

Use one of the properties, such as inSquareFeet, to retrieve the double value of the Area in the specified Area unit. For example,

Area plotArea = Area.fromHectares(20.0);
assert(plotArea.fromSquareMetres == 200000.0);

This class provides a collection of arithmetic and comparison operators. See Measurement for the collection of arithmetic and comparison operators which this class provides.

Inheritance

Constructors

Area.fromAcres(double acres)
Returns a new Area object from the number of feet.
const
Area.fromCircle(Length radius)
Returns a new Area object from the radius of a circle.
factory
Area.fromHectares(double hectares)
Returns a new Area object from the number of inches.
const
Area.fromRectangle(Length length, Length width)
Returns a new Area object from the length and width of a rectangle.
factory
Area.fromSquareCentimetres(double squareCentimetres)
Returns a new Area object from the number of cm².
const
Area.fromSquareFeet(double squareFeet)
Returns a new Area object from the number of metres.
const
Area.fromSquareInches(double squareInches)
Returns a new Area object from the number of kilometres.
const
Area.fromSquareKilometres(double squareKilometres)
Returns a new Area object from the number of centimetres.
const
Area.fromSquareMetres(double squareMetres)
Returns a new Area object from the number of Centimetres.
const
Area.fromSquareMiles(double squareMiles)
Returns a new Area object from the number of miles.
const
Area.fromSquareYards(double squareYards)
Returns a new Area object from the number of yards.
const
Area.fromTriangle(Length base, Length height)
Returns a new Area object from the base and height of a triangle.
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
inAcres double
Returns the total number of acres making up this Area.
read-only
inHectares double
Returns the total number of hectares making up this Area.
read-only
inSquareCentimetres double
Returns the total number of centimetres making up this Area.
read-only
inSquareFeet double
Returns the total number of feet² making up this Area.
read-only
inSquareInches double
Returns the total number of km² making up this Area.
read-only
inSquareKilometres double
Returns the total number of kilometres² making up this Area.
read-only
inSquareMetres double
Returns the total number of metres² making up this Area.
read-only
inSquareMiles double
Returns the total number of miles² making up this Area.
read-only
inSquareYards double
Returns the total number of yards² making up this Area.
read-only
isNegative bool
Returns whether this Measurement is negative.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

abs() Area
Returns a new object of T representing the absolute value of this Measurement. [...]
inherited
compareTo(Area other) int
Compares this Measurement to other, returning zero if the values are equal. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator *(double other) Area
Multiples this Measurement by other and returns the result as a new object of T.
inherited
operator +(Area other) Area
Adds this Measurement and other and returns the sum as a new object of T.
inherited
operator -(Area other) Area
Subtracts other from this Measurement and returns the difference as a new object of T.
inherited
operator /(double other) Area
Divides this Measurement by other and returns the result as a new object of T.
inherited
operator <(Area other) bool
Returns true if the value of this Measurement is less than the value of other.
inherited
operator <=(Area other) bool
Returns true if the value of this Measurement is less than or equal to the value of other.
inherited
operator ==(dynamic other) bool
Returns true if this Measurement has the same value as other.
inherited
operator >(Area other) bool
Returns true if the value of this Measurement is greater than the value of other.
inherited
operator >=(Area other) bool
Returns true if the value of this Measurement is greater than or equal to the value of other.
inherited
operator unary-() Area
Returns a new object of T representing this Measurement negated. [...]
inherited