SharpBorderRadius class
- Inheritance
-
- Object
- BorderRadiusGeometry
- BorderRadius
- SharpBorderRadius
Constructors
- SharpBorderRadius({required double cornerRadius, double sharpRatio = 0})
- SharpBorderRadius.all(SharpRadius radius)
-
Creates a border radius where all radii are
radius
.const - SharpBorderRadius.horizontal({SharpRadius left = SharpRadius.zero, SharpRadius right = SharpRadius.zero})
-
Creates a horizontally symmetrical border radius where the left and right
sides of the rectangle have the same radii.
const
- SharpBorderRadius.only({SharpRadius topLeft = SharpRadius.zero, SharpRadius topRight = SharpRadius.zero, SharpRadius bottomLeft = SharpRadius.zero, SharpRadius bottomRight = SharpRadius.zero})
-
Creates a border radius with only the given non-zero values. The other
corners will be right angles.
const
- SharpBorderRadius.vertical({SharpRadius top = SharpRadius.zero, SharpRadius bottom = SharpRadius.zero})
-
Creates a vertically symmetric border radius where the top and bottom
sides of the rectangle have the same radii.
const
Properties
- bottomLeft → SharpRadius
-
The bottom-left SharpRadius.
final
- bottomRight → SharpRadius
-
The bottom-right SharpRadius.
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 → SharpRadius
-
The top-left SharpRadius.
final
- topRight → SharpRadius
-
The top-right SharpRadius.
final
Methods
-
add(
BorderRadiusGeometry other) → BorderRadiusGeometry -
Returns the sum of two BorderRadiusGeometry objects.
override
-
copyWith(
{Radius? topLeft, Radius? topRight, Radius? bottomLeft, Radius? bottomRight}) → SharpBorderRadius -
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
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator %(
double other) → SharpBorderRadius -
Computes the remainder of each corner by the given factor.
override
-
operator *(
double other) → SharpBorderRadius -
Scales each corner of the BorderRadius by the given factor.
override
-
operator +(
BorderRadius other) → SharpBorderRadius -
Returns the sum of two BorderRadius objects.
override
-
operator -(
BorderRadius other) → SharpBorderRadius -
Returns the difference between two BorderRadius objects.
override
-
operator /(
double other) → SharpBorderRadius -
Divides each corner of the BorderRadius by the given factor.
override
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator unary-(
) → SharpBorderRadius -
Returns the BorderRadius object with each corner negated.
override
-
operator ~/(
double other) → SharpBorderRadius -
Integer divides each corner of the BorderRadius by the given factor.
override
Static Methods
-
lerp(
SharpBorderRadius? a, SharpBorderRadius? b, double t) → SharpBorderRadius? -
Linearly interpolate between two BorderRadius objects.
override
Constants
- zero → const SharpBorderRadius
- A border radius with all zero radii.