An immutable set of offsets in each of the four cardinal directions, but whose horizontal components are dependent on the writing direction.

This can be used to indicate padding from the left in TextDirection.ltr text and padding from the right in TextDirection.rtl text without having to be aware of the current text direction.

See also:

  • EdgeInsets, a variant that uses physical labels (left and right instead of start and end).
Inheritance

Constructors

EdgeInsetsDirectional.fromSTEB(double start, double top, double end, double bottom)
Creates insets from offsets from the start, top, end, and bottom.
const
EdgeInsetsDirectional.only({double start: 0.0, double top: 0.0, double end: 0.0, double bottom: 0.0 })
Creates insets with only the given values non-zero. [...]
const

Properties

bottom double
The offset from the bottom. [...]
final
end double
The offset from the end side, the side on which the user ends reading text. [...]
final
flipped EdgeInsetsDirectional
An EdgeInsetsDirectional with top and bottom as well as start and end flipped.
read-only
isNonNegative bool
Whether every dimension is non-negative.
read-only
start double
The offset from the start side, the side from which the user will start reading text. [...]
final
top double
The offset from the top. [...]
final
collapsedSize Size
The size that this EdgeInsets would occupy with an empty interior.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
horizontal double
The total offset in the vertical direction.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
vertical double
The total offset in the horizontal direction.
read-only, inherited

Methods

add(EdgeInsetsGeometry other) EdgeInsetsGeometry
Returns the sum of two EdgeInsetsGeometry objects. [...]
resolve(TextDirection direction) EdgeInsets
Convert this instance into an EdgeInsets, which uses literal coordinates (i.e. the left coordinate being explicitly a distance from the left, and the right coordinate being explicitly a distance from the right). [...]
subtract(EdgeInsetsGeometry other) EdgeInsetsGeometry
Returns the difference between two EdgeInsetsGeometry objects. [...]
along(Axis axis) double
The total offset in the given direction.
inherited
deflateSize(Size size) Size
Returns a new size that is smaller than the given size by the amount of inset in the horizontal and vertical directions. [...]
inherited
inflateSize(Size size) Size
Returns a new size that is bigger than the given size by the amount of inset in the horizontal and vertical directions. [...]
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) EdgeInsetsDirectional
Computes the remainder in each dimension by the given factor.
operator *(double other) EdgeInsetsDirectional
Scales the EdgeInsetsDirectional object in each dimension by the given factor.
operator +(EdgeInsetsDirectional other) EdgeInsetsDirectional
Returns the sum of two EdgeInsetsDirectional objects.
operator -(EdgeInsetsDirectional other) EdgeInsetsDirectional
Returns the difference between two EdgeInsetsDirectional objects.
operator /(double other) EdgeInsetsDirectional
Divides the EdgeInsetsDirectional object in each dimension by the given factor.
operator unary-() EdgeInsetsDirectional
Returns the EdgeInsetsDirectional object with each dimension negated. [...]
operator ~/(double other) EdgeInsetsDirectional
Integer divides the EdgeInsetsDirectional object in each dimension by the given factor.
operator ==(other) bool
The equality operator. [...]
inherited

Static Methods

lerp(EdgeInsetsDirectional a, EdgeInsetsDirectional b, double t) EdgeInsetsDirectional
Linearly interpolate between two EdgeInsetsDirectional. [...]

Constants

zero EdgeInsetsDirectional
An EdgeInsetsDirectional with zero offsets in each direction. [...]
const EdgeInsetsDirectional.only()