OpacityEffect.to constructor

OpacityEffect.to(
  1. double targetOpacity,
  2. EffectController controller, {
  3. OpacityProvider? target,
  4. void onComplete()?,
  5. ComponentKey? key,
})

This constructor will set the opacity to the specified opacity over time.

Implementation

factory OpacityEffect.to(
  double targetOpacity,
  EffectController controller, {
  OpacityProvider? target,
  void Function()? onComplete,
  ComponentKey? key,
}) {
  return _OpacityToEffect(
    targetOpacity,
    controller,
    target: target,
    onComplete: onComplete,
    key: key,
  );
}