OpacityTween constructor

const OpacityTween({
  1. Key? key,
  2. required Widget child,
  3. Duration duration = const Duration(milliseconds: 250),
  4. Duration reverseDuration = const Duration(milliseconds: 250),
  5. Duration delay = const Duration(milliseconds: 0),
  6. Curve curve = Curves.linear,
  7. Curve reverseCurve = Curves.linear,
  8. double begin = 0.2,
  9. double end = 1.0,
  10. bool reverse = false,
})

Creates an OpacityTween widget.

The child parameter is required and specifies the widget to be animated. The duration parameter specifies the duration of the forward animation. The reverseDuration parameter specifies the duration of the reverse animation. The delay parameter specifies the delay before starting the animation. The curve parameter specifies the curve used for the forward animation. The reverseCurve parameter specifies the curve used for the reverse animation. The begin parameter specifies the initial opacity value. The end parameter specifies the final opacity value. The reverse parameter specifies whether to play the animation in reverse.

Implementation

const OpacityTween({
  super.key,
  required this.child,
  this.duration = const Duration(milliseconds: 250),
  this.reverseDuration = const Duration(milliseconds: 250),
  this.delay = const Duration(milliseconds: 0),
  this.curve = Curves.linear,
  this.reverseCurve = Curves.linear,
  this.begin = 0.2,
  this.end = 1.0,
  this.reverse = false,
});