SmoothBorderRadius class
- Inheritance
-
- Object
- BorderRadiusGeometry
- BorderRadius
- SmoothBorderRadius
Constructors
- SmoothBorderRadius.new({required double cornerRadius, double cornerSmoothing = 0})
- SmoothBorderRadius.all(SmoothRadius radius)
-
Creates a border radius where all radii are
radius
.const - SmoothBorderRadius.horizontal({SmoothRadius left = SmoothRadius.zero, SmoothRadius right = SmoothRadius.zero})
-
Creates a horizontally symmetrical border radius where the left and right
sides of the rectangle have the same radii.
const
- SmoothBorderRadius.only({SmoothRadius topLeft = SmoothRadius.zero, SmoothRadius topRight = SmoothRadius.zero, SmoothRadius bottomLeft = SmoothRadius.zero, SmoothRadius bottomRight = SmoothRadius.zero})
-
Creates a border radius with only the given non-zero values. The other
corners will be right angles.
const
- SmoothBorderRadius.vertical({SmoothRadius top = SmoothRadius.zero, SmoothRadius bottom = SmoothRadius.zero})
-
Creates a vertically symmetric border radius where the top and bottom
sides of the rectangle have the same radii.
const
Properties
- bottomLeft → SmoothRadius
-
The bottom-left SmoothRadius.
final
- bottomRight → SmoothRadius
-
The bottom-right SmoothRadius.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- topLeft → SmoothRadius
-
The top-left SmoothRadius.
final
- topRight → SmoothRadius
-
The top-right SmoothRadius.
final
Methods
-
add(
BorderRadiusGeometry other) → BorderRadiusGeometry -
Returns the sum of two BorderRadiusGeometry objects.
override
-
copyWith(
{Radius? topLeft, Radius? topRight, Radius? bottomLeft, Radius? bottomRight}) → SmoothBorderRadius -
Returns a copy of this BorderRadius with the given fields replaced with
the new values.
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
-
toPath(
Rect rect) → Path - Creates a Path inside the given Rect.
-
toRRect(
Rect rect) → RRect -
Creates an RRect from the current border radius and a Rect.
inherited
-
toRSuperellipse(
Rect rect) → RSuperellipse -
Creates an RSuperellipse from the current border radius and a Rect.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator %(
double other) → SmoothBorderRadius -
Computes the remainder of each corner by the given factor.
override
-
operator *(
double other) → SmoothBorderRadius -
Scales each corner of the BorderRadius by the given factor.
override
-
operator +(
BorderRadius other) → SmoothBorderRadius -
Returns the sum of two BorderRadius objects.
override
-
operator -(
BorderRadius other) → SmoothBorderRadius -
Returns the difference between two BorderRadius objects.
override
-
operator /(
double other) → SmoothBorderRadius -
Divides each corner of the BorderRadius by the given factor.
override
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator unary-(
) → SmoothBorderRadius -
Returns the BorderRadius object with each corner negated.
override
-
operator ~/(
double other) → SmoothBorderRadius -
Integer divides each corner of the BorderRadius by the given factor.
override
Static Methods
-
lerp(
SmoothBorderRadius? a, SmoothBorderRadius? b, double t) → SmoothBorderRadius? -
Linearly interpolate between two BorderRadius objects.
override
Constants
- zero → const SmoothBorderRadius
- A border radius with all zero radii.