Roll constructor

const Roll({
  1. Key? key,
  2. Gradient? gradient,
  3. Crinkle crinkle = Crinkle.smooth,
  4. Widget? child,
})

Provide a Roll for Foil.

Sharing Gradients

A gradient in an ancestral Roll may be provided to a descendent Foil as its Foil.gradient if one is not explicitly perscribed in the Foil.

  • If neither an ancestral Roll nor a Foil dictates its own gradient, then the default is Foils.rainbows.linear.
  • A descendent that provides its own Foil.gradient will override this gradient.

Animations

This Roll can also serve to provide animation properties to a descendent Foil, regardless if its serving its gradient.

The crinkle parameter defaults to Crinkle.smooth which is not animated (although each Roll has its own AnimationController). A Crinkle dictates speed, intensity, and directionality of animation.

A Literally Shared Gradient

TODO:

Ideally a Roll will allow the definition of a swath of space, dictated by the tree underneath it, to shade with a single larger Gradientfrom which any descendent Foil widgets could be offset/masked.

Implementation

const Roll({
  Key? key,
  this.gradient,
  this.crinkle = Crinkle.smooth,
  this.child,
}) : super(key: key);