fadeOut method
Fade Out
Caches current volume into _cachedTargetVolume and fades to 0.0.
Implementation
Future<void> fadeOut({
Duration duration = const Duration(seconds: 2),
Curve curve = Curves.easeOut,
}) async {
_cachedTargetVolume = _volume;
await fadeTo(0.0, duration: duration, curve: curve);
}