cardContentOpacity static method

double cardContentOpacity(
  1. double progress
)

Card/preview content opacity. Fades out as we approach fullscreen. Staggered: starts fading at 0.25, fully gone by 0.55.

Implementation

static double cardContentOpacity(double progress) {
  final t = progress.clamp(0.0, 1.0);
  if (t < 0.25) return 1.0;
  return ((0.55 - t) / 0.30).clamp(0.0, 1.0);
}