MoonSquircleBorderRadius class
- Inheritance
-
- Object
- BorderRadiusGeometry
- BorderRadius
- MoonSquircleBorderRadius
- Available Extensions
Constructors
- MoonSquircleBorderRadius({required double cornerRadius, double cornerSmoothing = 0.9})
- MoonSquircleBorderRadius.all(MoonSquircleRadius radius)
-
Creates a border radius with all radii set to
radius
.const - MoonSquircleBorderRadius.horizontal({MoonSquircleRadius left = MoonSquircleRadius.zero, MoonSquircleRadius right = MoonSquircleRadius.zero})
-
Creates a border radius with horizontal symmetry, ensuring that the left and right
sides of the rectangle have the same radii.
const
- MoonSquircleBorderRadius.only({MoonSquircleRadius topLeft = MoonSquircleRadius.zero, MoonSquircleRadius topRight = MoonSquircleRadius.zero, MoonSquircleRadius bottomLeft = MoonSquircleRadius.zero, MoonSquircleRadius bottomRight = MoonSquircleRadius.zero})
-
Creates a border radius with only the provided non-zero values, resulting in
right angles for the other corners.
const
- MoonSquircleBorderRadius.vertical({MoonSquircleRadius top = MoonSquircleRadius.zero, MoonSquircleRadius bottom = MoonSquircleRadius.zero})
-
Creates a border radius with vertical symmetry, ensuring that the top and bottom
sides of the rectangle have the same radii.
const
Properties
- bottomLeft → MoonSquircleRadius
-
The bottom-left MoonSquircleRadius.
final
- bottomRight → MoonSquircleRadius
-
The bottom-right MoonSquircleRadius.
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 → MoonSquircleRadius
-
The top-left MoonSquircleRadius.
final
- topRight → MoonSquircleRadius
-
The top-right MoonSquircleRadius.
final
Methods
-
add(
BorderRadiusGeometry other) → BorderRadiusGeometry -
Returns the sum of two BorderRadiusGeometry objects.
override
-
copyWith(
{Radius? topLeft, Radius? topRight, Radius? bottomLeft, Radius? bottomRight}) → MoonSquircleBorderRadius -
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) → MoonSquircleBorderRadius -
Computes the remainder of each corner by the given factor.
override
-
operator *(
double other) → MoonSquircleBorderRadius -
Scales each corner of the BorderRadius by the given factor.
override
-
operator +(
BorderRadius other) → MoonSquircleBorderRadius -
Returns the sum of two BorderRadius objects.
override
-
operator -(
BorderRadius other) → MoonSquircleBorderRadius -
Returns the difference between two BorderRadius objects.
override
-
operator /(
double other) → MoonSquircleBorderRadius -
Divides each corner of the BorderRadius by the given factor.
override
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator unary-(
) → MoonSquircleBorderRadius -
Returns the BorderRadius object with each corner negated.
override
-
operator ~/(
double other) → MoonSquircleBorderRadius -
Integer divides each corner of the BorderRadius by the given factor.
override
Static Methods
-
lerp(
MoonSquircleBorderRadius? a, MoonSquircleBorderRadius? b, double t) → MoonSquircleBorderRadius? -
Linearly interpolate between two BorderRadius objects.
override
Constants
- zero → const MoonSquircleBorderRadius
- The border radius with zero radii.