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
isUniform bool
no setteroverride
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
uniform Radius
no setteroverride

Methods

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
toString() String
A string representation of this object.
inherited

Operators

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

Constants

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