overlayBackgroundScale static method

double overlayBackgroundScale(
  1. double overlayProgress,
  2. double expandProgress, {
  3. double minScale = 0.95,
})

Background scale for the two-phase overlay system.

Implementation

static double overlayBackgroundScale(
  double overlayProgress,
  double expandProgress, {
  double minScale = 0.95,
}) {
  final combined = (overlayProgress * 0.5 + expandProgress * 0.5).clamp(
    0.0,
    1.0,
  );
  return lerpDouble(1.0, minScale, combined)!;
}