floatingSheetRadius function
A foot rounder than a square display's corners would show beside it; where the platform reports no corners, a floating foot matches the top.
Implementation
BorderRadius floatingSheetRadius(BorderRadius? display, double float) {
final corners = display ?? BorderRadius.zero;
Radius top(Radius corner) => Radius.circular(
corner.x > 0 ? math.min(corner.x, _sheetCorner) : AppCorner.xxl,
);
Radius foot(Radius corner) => Radius.circular(
lerpDouble(
math.min(corner.x, _sheetCorner),
corner.x > 0 ? _sheetCorner : AppCorner.xxl,
float,
)!,
);
return BorderRadius.only(
topLeft: top(corners.topLeft),
topRight: top(corners.topRight),
bottomLeft: foot(corners.bottomLeft),
bottomRight: foot(corners.bottomRight),
);
}