ShapeDecorationWithPremultipliedAlpha class

Inheritance

Constructors

ShapeDecorationWithPremultipliedAlpha({Color? color, DecorationImage? image, Gradient? gradient, List<BoxShadow>? shadows, required ShapeBorder shape})
Creates a shape decoration with premultiplied alpha for color lerp. In others respects, it is identical to ShapeDecoration.
const
ShapeDecorationWithPremultipliedAlpha.fromBoxDecoration(BoxDecoration source)
Creates a shape decoration configured to match a BoxDecoration.
factory

Properties

color Color?
The color to fill in the background of the shape.
final
gradient Gradient?
A gradient to use for filling the shape.
final
hashCode int
The hash code for this object.
no setteroverride
image DecorationImage?
An image to paint inside the shape (clipped to its outline).
final
isComplex bool
Whether this decoration is complex enough to benefit from caching its painting.
no setteroverride
padding EdgeInsetsGeometry
The inset space occupied by the shape's border.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadows List<BoxShadow>?
The list of shadows cast by the shape.
final
shape ShapeBorder
The shape to fill the color, gradient, and image into and to cast as the shadows.
final

Methods

createBoxPainter([VoidCallback? onChanged]) BoxPainter
Returns a BoxPainter that will paint this decoration.
override
debugAssertIsValid() bool
In debug mode, throws an exception if the object is not in a valid configuration. Otherwise, returns true.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
getClipPath(Rect rect, TextDirection textDirection) Path
Returns a closed Path that describes the outer edge of this decoration.
override
hitTest(Size size, Offset position, {TextDirection? textDirection}) bool
Tests whether the given point, on a rectangle of a given size, would be considered to hit the decoration or not. For example, if the decoration only draws a circle, this function might return true if the point was inside the circle and false otherwise.
override
lerpFrom(Decoration? a, double t) ShapeDecorationWithPremultipliedAlpha?
Linearly interpolates from another Decoration (which may be of a different class) to this.
override
lerpTo(Decoration? b, double t) ShapeDecorationWithPremultipliedAlpha?
Linearly interpolates from this to another Decoration (which may be of a different class).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override