wrapBackdrop method
Widget
wrapBackdrop(
- BuildContext context,
- Widget child,
- double t, {
- bool isRoot = true,
override
Wraps child (the backdrop content) with the visual transform for
progress t (0 = closed, 1 = fully open).
isRoot is true for the bottom-most layer in a stack of sheets (the one
that wraps the actual app content); root layers may additionally clip
their corners as they scale in.
Implementation
@override
Widget wrapBackdrop(BuildContext context, Widget child, double t,
{bool isRoot = true}) {
final scale = scaleAt(t);
Widget result = child;
if (isRoot) {
final radius = cornerRadius ?? Theme.of(context).radiusXxl;
result = ClipRRect(
borderRadius: BorderRadius.circular(radius * t),
child: result,
);
}
return Transform.scale(scale: scale, child: result);
}