BorderRadiusDirectional class

An immutable set of radii for each corner of a rectangle, but with the corners specified in a manner dependent on the writing direction.

This can be used to specify a corner radius on the leading or trailing edge of a box, so that it flips to the other side when the text alignment flips (e.g. being on the top right in English text but the top left in Arabic text).

See also:

  • BorderRadius, a variant that uses physical labels (topLeft and topRight instead of topStart and topEnd).
Inheritance

Constructors

BorderRadiusDirectional.all(Radius radius)
Creates a border radius where all radii are radius.
const
BorderRadiusDirectional.circular(double radius)
Creates a border radius where all radii are Radius.circular(radius).
BorderRadiusDirectional.horizontal({Radius start = Radius.zero, Radius end = Radius.zero})
Creates a horizontally symmetrical border radius where the start and end sides of the rectangle have the same radii.
const
BorderRadiusDirectional.only({Radius topStart = Radius.zero, Radius topEnd = Radius.zero, Radius bottomStart = Radius.zero, Radius bottomEnd = Radius.zero})
Creates a border radius with only the given non-zero values. The other corners will be right angles.
const
BorderRadiusDirectional.vertical({Radius top = Radius.zero, Radius bottom = Radius.zero})
Creates a vertically symmetric border radius where the top and bottom sides of the rectangle have the same radii.
const

Properties

bottomEnd Radius
The bottom-end Radius.
final
bottomStart Radius
The bottom-start Radius.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
topEnd Radius
The top-end Radius.
final
topStart Radius
The top-start Radius.
final

Methods

add(BorderRadiusGeometry other) BorderRadiusGeometry
Returns the sum of two BorderRadiusGeometry objects.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(TextDirection? direction) BorderRadius
Convert this instance into a BorderRadius, so that the radii are expressed for specific physical corners (top-left, top-right, etc) rather than in a direction-dependent manner.
override
subtract(BorderRadiusGeometry other) BorderRadiusGeometry
Returns the difference between two BorderRadiusGeometry objects.
override
toString() String
A string representation of this object.
inherited

Operators

operator %(double other) BorderRadiusDirectional
Computes the remainder of each corner by the given factor.
override
operator *(double other) BorderRadiusDirectional
Scales each corner of the BorderRadiusDirectional by the given factor.
override
operator +(BorderRadiusDirectional other) BorderRadiusDirectional
Returns the sum of two BorderRadiusDirectional objects.
operator -(BorderRadiusDirectional other) BorderRadiusDirectional
Returns the difference between two BorderRadiusDirectional objects.
operator /(double other) BorderRadiusDirectional
Divides each corner of the BorderRadiusDirectional by the given factor.
override
operator ==(Object other) bool
The equality operator.
inherited
operator unary-() BorderRadiusDirectional
Returns the BorderRadiusDirectional object with each corner negated.
override
operator ~/(double other) BorderRadiusDirectional
Integer divides each corner of the BorderRadiusDirectional by the given factor.
override

Static Methods

lerp(BorderRadiusDirectional? a, BorderRadiusDirectional? b, double t) BorderRadiusDirectional?
Linearly interpolate between two BorderRadiusDirectional objects.
override

Constants

zero → const BorderRadiusDirectional
A border radius with all zero radii.