TapReaction.fade constructor

const TapReaction.fade({
  1. Key? key,
  2. required Widget child,
  3. Duration duration = const Duration(milliseconds: 120),
  4. Curve curve = Curves.easeInOutCubic,
  5. double minOpacity = 0.5,
})

Animates its child using a opacity animation.

More specifically it uses the Opacity widget with the opacity comes from an animation controller.

Implementation

const TapReaction.fade({
  Key? key,
  required this.child,
  this.duration = const Duration(milliseconds: 120),
  this.curve = Curves.easeInOutCubic,
  double minOpacity = 0.5,
})  : assert(minOpacity >= 0 && minOpacity <= 1),
      animationValue = minOpacity,
      animationType = AnimationType.fade,
      super(key: key);