StacShadow class
A Stac representation of shadows for visual effects.
This class defines shadow properties including color, offset, and blur radius. Shadows can be applied to various UI elements to create depth and visual hierarchy.
{@tool snippet} Dart Example:
const StacShadow(
color: '#000000',
offset: StacOffset(2.0, 4.0),
blurRadius: 6.0,
)
{@end-tool}
{@tool snippet} JSON Example:
{
"color": "#000000",
"offset": {"dx": 2.0, "dy": 4.0},
"blurRadius": 6.0
}
{@end-tool}
- Implemented types
- Annotations
-
- @JsonSerializable()
Constructors
- StacShadow.new({String? color, StacOffset? offset, double? blurRadius})
-
Creates a shadow with optional color, offset, and blur radius.
const
-
StacShadow.fromJson(Map<
String, dynamic> json) -
Creates a StacShadow from a JSON map.
factory
Properties
- blurRadius → double?
-
The blur radius of the shadow in logical pixels.
final
- color → String?
-
The shadow color as hex string or theme color name.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- offset → StacOffset?
-
The offset position of the shadow relative to the element.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this StacShadow instance to a JSON map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited