BoxDecoration class

Defines the visual decoration style (background and borders) for a box.

Consists of an optional background style and an optional Border.

Example Usage

const decoration = BoxDecoration(
  backgroundStyle: Style(background: Color(0xFF0000FF)),
  border: Border.rounded,
);

Properties

Property Type Description
backgroundStyle Style? The style (e.g. color) used to paint background cells.
border Border? The border style configuration.

Constructors

BoxDecoration({Style? backgroundStyle, Color? backgroundColor, Border? border})
Creates a new BoxDecoration.
const

Properties

backgroundColor Color?
The background color.
final
backgroundStyle Style?
The style used to paint the background.
final
border Border?
The border configuration.
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

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