Sheet constructor

const Sheet({
  1. Color? color,
  2. double? width,
  3. double? height,
  4. EdgeInsetsGeometry? margin,
  5. EdgeInsetsGeometry? padding,
  6. AlignmentGeometry? alignment,
  7. Decoration? decoration,
  8. Decoration? foregroundDecoration,
  9. Clip clipBehavior = Clip.none,
  10. BoxConstraints? constraints,
  11. Matrix4? transform,
  12. AlignmentGeometry? transformAlignment,
})

A wrapper for the parameters that pertain to an Animated/Container.

If not provided an initializing color nor decoration, this field defaults to Colors.black so that a Foil.sheet has pixels to which it can mask its gradient.

Note that if provided a decoration, but that Decoration has no color, and no initializing color value was provided either, this Sheet may potentially result in a layer that has no pixels to which a Foil may be masked.

See also:

  • new Container, whose properties this Sheet mimics

Implementation

const Sheet({
  Color? color,
  this.width,
  this.height,
  this.margin,
  this.padding,
  this.alignment,
  this.decoration,
  this.foregroundDecoration,
  this.clipBehavior = Clip.none,
  this.constraints,
  this.transform,
  this.transformAlignment,
}) : color = (color == null && decoration == null) ? Colors.black : color;