Foil class

Inheritance

Constructors

Foil.new({Key? key, bool isUnwrapped = false, double opacity = 1.0, bool useSensor = true, Gradient? gradient, BlendMode blendMode = BlendMode.srcATop, Scalar scalar = const Scalar(), Gradient? unwrappedGradient, bool isAgressive = false, required Widget child, Duration speed = const Duration(milliseconds: 150), Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.ease, VoidCallback? onEnd})
const
Foil.colored({Key? key, bool isUnwrapped = false, double opacity = 1.0, bool useSensor = true, required List<Color> colors, BlendMode blendMode = BlendMode.srcATop, Scalar scalar = Scalar.identity, Gradient? unwrappedGradient, bool isAgressive = true, required Widget child, Duration speed = const Duration(milliseconds: 150), Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.ease, VoidCallback? onEnd})
pointer-animated Foil
Foil.sheet({Key? key, Sheet sheet = const Sheet(), bool isUnwrapped = false, double opacity = 1.0, bool useSensor = true, Gradient? gradient, BlendMode blendMode = BlendMode.srcATop, Scalar scalar = Scalar.identity, Gradient? unwrappedGradient, bool isAgressive = true, Widget? child, Duration speed = const Duration(milliseconds: 150), Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.ease, VoidCallback? onEnd})
Create a sizeable Widget with the specified gradient and all the same properties as a standard Foil, but as its own standalone AnimatedContainer with or without a child.

Properties

blendMode BlendMode
The BlendMode utilized in painting this Foil's gradient over its child.
final
box Widget?
Made non-null by Foil.sheet and then wraps child.
final
child Widget
Wrap this child in Foil.
Ideally, for performance, a single static Widget.
final
curve Curve
The Curve for the animation of this Foil, either by translation through pointer movements or by altering gradient.
final
duration Duration
The Duration over which any changes to this Foil's gradient will intrinsically animate. Default is 500ms.
final
gradient Gradient?
Customize the visual appearance of this Foil.
final
hashCode int
The hash code for this object.
no setterinherited
isAgressive bool
Control the method used to lerp the gradients.
final
isUnwrapped bool
If isUnwrapped is true, this Foil's gradient will be inactive. Default is false.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onEnd VoidCallback?
Register a callback Function to perform when this Foil finishes transitioning intrinsically from one gradient to another.
final
opacity double
Override the alpha channels in this Foil's gradient by providing an opacity value by which the gradient will be Gradient.scaled.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scalar Scalar
A Scalar provides an opportunity to modify horizontal and vertical pointer movement data independently before they translate to Foil gradient "twinkling" transformation (offset/translation).
final
sheet Sheet
Only applicable for a self-contained Foil.sheet.
Defaults null unless constructing a Foil.sheet, where default is new Sheet.
final
speed Duration
How rapidly this Foil twinkles according to pointer movements.
final
unwrappedGradient Gradient?
Override the empty, transparent Gradient that this Foil transitions to when isUnwrapped is made true.
final
useSensor bool
Default is true.
pointer-animated Foil
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _FoilState
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, int wrapWidth = 65}) 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 short, textual description of this widget.
inherited

Operators

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