fade static method
Implementation
static VillainAnimation fade({
double fadeFrom = 0.0,
double fadeTo = 1.0,
Duration from = Duration.zero,
Duration to: _kMaterialRouteTransitionLength,
Curve curve: Curves.linear,
}) =>
VillainAnimation(
from: from,
curve: curve,
to: to,
animatable: Tween<double>(begin: fadeFrom, end: fadeTo),
animatedWidgetBuilder: (animation, child) {
return FadeTransition(
opacity: animation as Animation<double>,
child: child,
);
});