Background.layers constructor

Background.layers(
  1. List<Object> layers
)

Creates a comma-separated layered background.

Implementation

factory Background.layers(List<Object> layers) {
  if (layers.isEmpty) {
    throw ArgumentError.value(layers, 'layers', 'Must not be empty.');
  }
  return Background(layers.map(cssValue).join(', '));
}