RoundedRectangleGradientBorder class

A border that paints a gradient.

Inheritance

Constructors

RoundedRectangleGradientBorder({Gradient gradient = const LinearGradient(colors: []), BorderRadiusGeometry borderRadius = BorderRadius.zero, double width = 1.0, double strokeAlign = strokeAlignInside, BorderStyle style = BorderStyle.solid})
Creates a rounded rectangle border.
const

Properties

borderRadius BorderRadiusGeometry
The radii for each corner.
final
dimensions EdgeInsetsGeometry
The widths of the sides of this border represented as an EdgeInsets.
no setteroverride
gradient Gradient
the gradient used to paint the border.
final
hashCode int
The hash code for this object.
no setteroverride
preferPaintInterior bool
Reports whether paintInterior is implemented.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strokeAlign double
The relative position of the stroke on a BorderSide in an OutlinedBorder or Border.
final
strokeInset double
Get the amount of the stroke width that lies inside of the BorderSide.
no setter
strokeOffset double
The offset of the stroke, taking into account the stroke alignment.
no setter
strokeOutset double
Get the amount of the stroke width that lies outside of the BorderSide.
no setter
style BorderStyle
The style of this side of the border. Default to BorderStyle.solid
final
width double
The width of this side of the border, in logical pixels.
final

Methods

add(ShapeBorder other, {bool reversed = false}) ShapeBorder?
Attempts to create a new object that represents the amalgamation of this border and the other border.
inherited
copyWith({required Gradient gradient, required BorderRadiusGeometry borderRadius, required double width, required double strokeAlign}) RoundedRectangleGradientBorder
Returns a copy of this RoundedRectangleBorder with the given fields replaced with the new values.
getInnerPath(Rect rect, {TextDirection? textDirection}) Path
Create a Path that describes the inner edge of the border.
override
getOuterPath(Rect rect, {TextDirection? textDirection}) Path
Create a Path that describes the outer edge of the border.
override
lerpFrom(ShapeBorder? a, double t) ShapeBorder?
Linearly interpolates from another ShapeBorder (possibly of another class) to this.
inherited
lerpTo(ShapeBorder? b, double t) ShapeBorder?
Linearly interpolates from this to another ShapeBorder (possibly of another class).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) → void
Paints the border within the given Rect on the given Canvas.
override
paintInterior(Canvas canvas, Rect rect, Paint paint, {TextDirection? textDirection}) → void
Paint a canvas with the appropriate shape.
override
scale(double t) ShapeBorder
Creates a copy of this border, scaled by the factor t.
override
toString() String
A string representation of this object.
override

Operators

operator +(ShapeBorder other) ShapeBorder
Creates a new border consisting of the two borders on either side of the operator.
inherited
operator ==(Object other) bool
The equality operator.
override

Constants

strokeAlignCenter → const double
The border is drawn on the center of the border path, with half of the BorderSide.width on the inside, and the other half on the outside of the path.
strokeAlignInside → const double
The border is drawn fully inside of the border path.
strokeAlignOutside → const double
The border is drawn on the outside of the border path.