Square class

Inheritance

Constructors

Square(num side)
Constructs a Square with a given side length.
Square.from({num? side, num? diagonal, num? perimeter, num? area, num? inRadius, num? circumRadius})
Named constructor to create a Square from various parameters.

Properties

circumRadius → num
Get the outRadius of the rectangle.
no setter
hashCode → int
The hash code for this object.
no setterinherited
inRadius → num
Get the inRadius of the rectangle.
no setter
name ↔ String
The name of the geometric shape.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
side ↔ num
getter/setter pair

Methods

angleBetweenDiagonals() → Angle
Calculates the angle between the diagonal and the sides of a square.
area() → num
Calculates the area of the 2D geometric shape.
override
diagonal() → num
Calculates the diagonal length of the square.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
perimeter() → num
Calculates the perimeter of the 2D geometric shape.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited