BoxShadow class
A shadow cast by a box.
Inherits from Shadow
BoxShadow can cast non-rectangular shadows if the box is non-rectangular (e.g., has a border radius or a circular shape).
This class is similar to CSS box-shadow.
See also:
- Canvas.drawShadow, which is a more efficient way to draw shadows.
- Shadow, which is the parent class that lacks spreadRadius.
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, override
- spreadRadius → double
-
The amount the box should be inflated prior to applying the blur.
final
- blurRadius → double
-
The standard deviation of the Gaussian to convolve with the shadow's shape.
final, inherited
- blurSigma → double
-
The blurRadius in sigmas instead of logical pixels. [...]
read-only, inherited
- color → Color
-
Color that the shadow will be drawn with. [...]
final, inherited
- offset → Offset
-
The displacement of the shadow from the casting element. [...]
final, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
scale(
double factor) → BoxShadow -
Returns a new box shadow with its offset, blurRadius, and spreadRadius scaled by the given factor.
override
-
toPaint(
) → Paint -
Create the Paint object that corresponds to this shadow description. [...]
override
-
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
override