blobRadius static method
Corner radius of the droplet as it inflates from trigger into the sheet.
Starts fully rounded (a pill/circle the size of the trigger) and holds
the droplet round through early travel (sizeT <= 0.35). As the droplet
expands and settles into the sheet, the radius smoothly relaxes into
target with an easeInOut curve — giving a silky liquid unfolding rather
than a harsh last-frame snap.
Implementation
static double blobRadius({
required Size blobSize,
required double target,
required double sizeT,
}) {
final maxRadius = math.min(blobSize.width, blobSize.height) / 2.0;
final double s = sizeT.clamp(0.0, 1.0);
if (s <= 0.35) return maxRadius;
final p = (s - 0.35) / 0.65;
final t = Curves.easeInOutCubic.transform(p);
return lerpDouble(maxRadius, math.min(target, maxRadius), t)!;
}