BoxShadow class

The box-shadow CSS property adds shadow effects around an element's frame. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. You can set multiple effects using BoxShadow.combine.

Read more: MDN box-shadow

Constructors

BoxShadow({required Unit offsetX, required Unit offsetY, Unit? blur, Unit? spread, Color? color})
Create a box shadow with the given offsets, blur, spread, and color.
const
factory
BoxShadow.combine(List<BoxShadow> shadows)
Combine multiple box shadows into one.
const
factory
BoxShadow.inset({required Unit offsetX, required Unit offsetY, Unit? blur, Unit? spread, Color? color})
Create an inset box shadow with the given offsets, blur, spread, and color.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

inherit → const BoxShadow
initial → const BoxShadow
none → const BoxShadow
revert → const BoxShadow
revertLayer → const BoxShadow
unset → const BoxShadow