An immutable set of radii for each corner of a rectangle.

Used by BoxDecoration when the shape is a BoxShape.rectangle.

Annotations
  • immutable

Constants

zero BorderRadius

A border radius with all zero radii.

const BorderRadius.all(Radius.zero)

Static Methods

lerp(BorderRadius a, BorderRadius b, double t) BorderRadius

Linearly interpolates between two BorderRadius objects.

Constructors

BorderRadius.all(Radius radius)

Creates a border radius where all radii are radius.

const
BorderRadius.circular(double radius)

Creates a border radius where all radii are Radius.circular(radius).

BorderRadius.horizontal({Radius left: Radius.zero, Radius right: Radius.zero })

Creates a horizontally symmetrical border radius where the left and right sides of the rectangle have the same radii.

const
BorderRadius.only({Radius topLeft: Radius.zero, Radius topRight: Radius.zero, Radius bottomRight: Radius.zero, Radius bottomLeft: Radius.zero })

Creates a border radius with only the given non-zero values. The other corners will be right angles.

const
BorderRadius.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

bottomLeft Radius

The bottom-left Radius.

final
bottomRight Radius

The bottom-right Radius.

final
hashCode int

read-only
topLeft Radius

The top-left Radius.

final
topRight Radius

The top-right Radius.

final
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

Methods

toRRect(Rect rect) RRect

Creates a RRect from the current border radius and a Rect.

toString() String

Returns a string representation of this object.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited