decoration method

Modifier decoration(
  1. BoxDecoration decoration
)

Adds a decoration to the widget (e.g., border, shadow)

Implementation

Modifier decoration(BoxDecoration decoration) {
  return Modifier._([
    ..._modifiers,
    (widget) {
      return Container(
        decoration: decoration,
        child: widget,
      );
    }
  ]);
}