Foil class
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 })
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 setter inherited
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.
final inherited
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.scale d.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
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
.
final