buildSheet method
Implementation
@override
Widget buildSheet(BuildContext context, Widget child) {
SheetPhysics? effectivePhysics = BouncingSheetPhysics(
parent: SnapSheetPhysics(
stops: stops ?? <double>[0, 1],
parent: physics,
));
if (!draggable) {
effectivePhysics = const NeverDraggableSheetPhysics();
}
final MediaQueryData mediaQuery = MediaQuery.of(context);
final double topMargin =
math.max(_kSheetMinimalOffset, mediaQuery.padding.top) +
_kPreviousRouteVisibleOffset;
return Sheet.raw(
initialExtent: initialExtent,
decorationBuilder: decorationBuilder,
fit: fit,
maxExtent: mediaQuery.size.height - topMargin,
physics: effectivePhysics,
controller: sheetController,
child: child,
);
}