AnyBoxDecoration class

Rectangular AnyDecoration with independent side and corner overrides.

Inheritance

Constructors

AnyBoxDecoration({AnyBoxBorder border = const AnyBoxBorder(), List<AnyShadow> shadows = const [], AnyShapeBase clipBase = AnyShapeBase.zeroBorder, AnyShapeBase shadowBase = AnyShapeBase.zeroBorder, AnyBackground? background, bool enableCache = true})
const

Properties

background AnyBackground?
Fill painted behind side regions.
finalinherited
border AnyBoxBorder
Border defaults used by point when no point-specific values are provided.
no setteroverride
clipBase AnyShapeBase
Contour band returned by getClipPath.
finalinherited
enableCache bool
Whether built contours should be cached by decoration, size, and text direction.
finalinherited
hashCode int
The hash code for this object.
no setteroverride
isComplex bool
Whether this decoration is complex enough to benefit from caching its painting.
no setterinherited
padding EdgeInsetsGeometry
Returns the insets to apply when using this decoration on a box that has contents, so that the contents do not overlap the edges of the decoration. For example, if the decoration draws a frame around its edge, the padding would return the distance by which to inset the children so as to not overlap the frame.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowBase AnyShapeBase
Contour band used as the source path for shadows.
finalinherited
shadows List<AnyShadow>
Shadows painted from shadowBase.
finalinherited

Methods

buildContour(Size size, TextDirection? textDirection) AnyContour
inherited
buildPoints(Rect bounds, TextDirection? textDirection) List<AnyPoint>
Build raw contour points in local coordinates for this size.
override
createBoxPainter([VoidCallback? onChanged]) BoxPainter
Returns a BoxPainter that will paint this decoration.
inherited
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.
inherited
fitRatio(Size size, double? ratio) Rect
inherited
getClipPath(Rect rect, TextDirection textDirection) Path
Returns a closed Path that describes the outer edge of this decoration.
inherited
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.
inherited
lerpFrom(Decoration? a, double t) Decoration?
Linearly interpolates from another Decoration (which may be of a different class) to this.
inherited
lerpTo(Decoration? b, double t) Decoration?
Linearly interpolates from this to another Decoration (which may be of a different class).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
point(Offset point, {AnyCorner? outer, AnyCorner? inner, AnySide? side, bool skip = false}) AnyPoint
Builds an AnyPoint using decoration defaults for missing values.
inherited
points(Rect bounds, TextDirection? textDirection) List<AnyPoint>
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