shouldClipSurface static method

bool shouldClipSurface(
  1. double? surfaceOpacity
)

Determines if surface clipping should be enabled based on opacity.

Returns true if surfaceOpacity is null or less than 1.0, indicating that clipping is needed for proper visual effects.

Implementation

static bool shouldClipSurface(double? surfaceOpacity) {
  if (surfaceOpacity == null) {
    return true;
  }
  return surfaceOpacity < 1;
}