StreamBoxShadow class
Box shadow tokens for the Stream design system.
StreamBoxShadow provides consistent box shadow values for creating depth and visual hierarchy. Each elevation level represents a different degree of surface separation.
- elevation1: Low elevation for subtle separation
- elevation2: Medium-low elevation
- elevation3: Medium-high elevation
- elevation4: High elevation for prominent elements
For no shadow (elevation 0), simply don't apply any box shadow.
{@tool snippet}
Create a light theme box shadow and apply to a container:
final boxShadow = StreamBoxShadow.light();
Container(
decoration: BoxDecoration(
boxShadow: boxShadow.elevation2,
),
);
{@end-tool}
- Annotations
-
- @immutable
- @ThemeGen.new(constructor: 'raw')
Constructors
-
StreamBoxShadow.dark({List<
BoxShadow> ? elevation1, List<BoxShadow> ? elevation2, List<BoxShadow> ? elevation3, List<BoxShadow> ? elevation4}) -
Creates a dark theme box shadow configuration.
factory
-
StreamBoxShadow.light({List<
BoxShadow> ? elevation1, List<BoxShadow> ? elevation2, List<BoxShadow> ? elevation3, List<BoxShadow> ? elevation4}) -
Creates a light theme box shadow configuration.
factory
-
StreamBoxShadow.raw({required List<
BoxShadow> elevation1, required List<BoxShadow> elevation2, required List<BoxShadow> elevation3, required List<BoxShadow> elevation4}) -
Creates a StreamBoxShadow with the given values.
const
Properties
- canMerge → bool
-
no setterinherited
-
elevation1
→ List<
BoxShadow> -
Low elevation level for subtle separation.
final
-
elevation2
→ List<
BoxShadow> -
Medium-low elevation level.
final
-
elevation3
→ List<
BoxShadow> -
Medium-high elevation level.
final
-
elevation4
→ List<
BoxShadow> -
High elevation level for prominent elements.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{List< BoxShadow> ? elevation1, List<BoxShadow> ? elevation2, List<BoxShadow> ? elevation3, List<BoxShadow> ? elevation4}) → StreamBoxShadow -
inherited
-
merge(
StreamBoxShadow? other) → StreamBoxShadow -
inherited
-
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
Static Methods
-
lerp(
StreamBoxShadow? a, StreamBoxShadow? b, double t) → StreamBoxShadow? - Linearly interpolates between two StreamBoxShadow instances.