AnimatedFoil constructor

const AnimatedFoil({
  1. Key? key,
  2. required Gradient? gradient,
  3. required List<double> rolloutX,
  4. required List<double> rolloutY,
  5. required BlendMode blendMode,
  6. required bool useSensor,
  7. required bool isAgressive,
  8. required Widget child,
  9. required Duration speed,
  10. required Duration duration,
  11. Curve curve = Curves.linear,
  12. VoidCallback? onEnd,
})

Creates an animated foil effect.

The gradient parameter defines the gradient to be displayed. The rolloutX and rolloutY parameters control the positioning of the gradient based on pointer or roll animations. The blendMode determines how the gradient is blended with the child. The useSensor parameter controls whether pointer input affects the gradient. The isAgressive parameter controls the gradient lerp method. The duration parameter sets how long the gradient animation will take. The curve parameter defines the animation curve.

Implementation

const AnimatedFoil({
  Key? key,
  required this.gradient,
  required this.rolloutX,
  required this.rolloutY,
  required this.blendMode,
  required this.useSensor,
  required this.isAgressive,
  required this.child,
  required this.speed,
  required Duration duration,
  Curve curve = Curves.linear,
  VoidCallback? onEnd,
}) : super(key: key, duration: duration, curve: curve, onEnd: onEnd);