BoxDecoration class

Box decoration attributes of a component.

Constructors

BoxDecoration({Color? backgroundColor, String? backgroundImage, ObjectFit? imageFit, ObjectPosition? imagePosition, Gradient? gradient, Display? display, Color? foregroundColor, BorderData? border, bool? clip, BorderRadiusData? borderRadius, EdgeInsets? padding, EdgeInsets? margin, Alignment? alignment, PositionData? position, Shadow? shadow, double? opacity})
Create a new box decoration.
const

Properties

alignment → Alignment?
Alignment of the box child.
final
backgroundColor → Color?
Color applied to the box background.
final
backgroundImage → String?
Image applied to the box background.
final
border → BorderData?
Border of the box.
final
borderRadius → BorderRadiusData?
Border radius of the box.
final
clip → bool?
Whether to clip content that overflows the box.
final
cssText → String
Returns the CSS text from the style properties.
no setter
display → Display?
The CSS display value of the box.
final
foregroundColor → Color?
Color applied to the box child.
final
gradient → Gradient?
Gradient painted on the box.
final
hashCode → int
The hash code for this object.
no setteroverride
imageFit → ObjectFit?
How the background image should be sized to fit the box.
final
imagePosition → ObjectPosition?
How the background image should be positioned within the box.
final
margin → EdgeInsets?
Margin of the box.
final
opacity → double?
Opacity of the box.
final
padding → EdgeInsets?
Padding of the box child.
final
position → PositionData?
Position of the box.
final
props → Map<String, String>
Converts box decoration attributes to a CSS style map.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shadow → Shadow?
Shadow applied to the box.
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.
override