Roll constructor
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 aFoil
dictates its owngradient
, then the default isFoils.rainbows.linear
. - A descendent that provides its own
Foil.gradient
will override thisgradient
.
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.
- Crinkle.twinkling is a very slow moving preset
- Crinkle.vivacious is a highly-animated preset
- Build your own or opt to Crinkle.copyWith a preset
- Crinkle.scalar property can be used to invert, scale, or negate axes
- Crinkle.period determines the loop
Duration
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
Gradient
from 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);