in lib/feature_discovery/animation.dart [195:237]
Animation<double> tapTargetRadius(FeatureDiscoveryStatus status) {
switch (status) {
case FeatureDiscoveryStatus.closed:
return const AlwaysStoppedAnimation<double>(tapTargetMinRadius);
case FeatureDiscoveryStatus.open:
return Tween<double>(begin: tapTargetMinRadius, end: tapTargetMaxRadius)
.animate(CurvedAnimation(
parent: openController,
curve: const Interval(0, 0.4, curve: Curves.ease),
));
case FeatureDiscoveryStatus.ripple:
if (rippleController.value < 0.3) {
return Tween<double>(
begin: tapTargetMaxRadius, end: tapTargetRippleRadius)
.animate(CurvedAnimation(
parent: rippleController,
curve: const Interval(0, 0.3, curve: Curves.ease),
));
} else if (rippleController.value < 0.6) {
return Tween<double>(
begin: tapTargetRippleRadius, end: tapTargetMaxRadius)
.animate(CurvedAnimation(
parent: rippleController,
curve: const Interval(0.3, 0.6, curve: Curves.ease),
));
}
return const AlwaysStoppedAnimation<double>(tapTargetMaxRadius);
case FeatureDiscoveryStatus.tap:
return Tween<double>(begin: tapTargetMaxRadius, end: tapTargetMinRadius)
.animate(CurvedAnimation(
parent: tapController,
curve: Curves.ease,
));
case FeatureDiscoveryStatus.dismiss:
return Tween<double>(begin: tapTargetMaxRadius, end: tapTargetMinRadius)
.animate(CurvedAnimation(
parent: dismissController,
curve: Curves.ease,
));
default:
return const AlwaysStoppedAnimation<double>(tapTargetMaxRadius);
}
}