BoxShadow class Null safety
A shadow cast by a box.
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.
- PhysicalModel, a widget for showing shadows.
- kElevationToShadow, for some predefined shadows used in Material Design.
- Shadow, which is the parent class that lacks spreadRadius.
Constructors
Properties
- blurRadius → double
-
The standard deviation of the Gaussian to convolve with the shadow's shape.
finalinherited
- blurSigma → double
-
The blurRadius in sigmas instead of logical pixels.
read-onlyinherited
- blurStyle → BlurStyle
-
The BlurStyle to use for this shadow.
final
- color → Color
-
Color that the shadow will be drawn with.
finalinherited
- hashCode → int
-
The hash code for this object.
read-onlyoverride
- offset → Offset
-
The displacement of the shadow from the casting element.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- spreadRadius → double
-
The amount the box should be inflated prior to applying the blur.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
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 -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override