createSplashPathMaskClipper method
Path
createSplashPathMaskClipper(
- Size size
)
Implementation
Path createSplashPathMaskClipper(Size size) {
final clippedSpoilerPath = Path.combine(
PathOperation.intersect,
// If the fade radius is 0 or the fade animation is disabled, we clip to the entire spoiler region.
_splashRect == Rect.zero || !_config.enableFadeAnimation
? (Path()..addRect(spoilerBounds))
: (Path()..addOval(_splashRect)),
_spoilerPath,
);
final finalClipPath = Path.combine(
PathOperation.difference,
Path()..addRect(Offset.zero & size),
clippedSpoilerPath,
);
return finalClipPath;
}