Roll class

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.

Inheritance
Mixed in types

Constructors

Roll({Key? key, Gradient? gradient, Crinkle crinkle = Crinkle.smooth, Widget? child})
Provide a Roll for Foil.
const

Properties

child Widget?
The widget directly below this one in the tree.
final
crinkle Crinkle
This Roll can also serve to provide animation properties to a descendent Foil, regardless if its serving its gradient.
final
gradient Gradient?
The Gradient to provide to any children Foil widgets.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() RollState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) RollState?
Returns the nearest RollState ancestor.