buildSheet method
Implementation
@override
Widget buildSheet(BuildContext context) {
SheetPhysics? _physics = BouncingSheetPhysics(
parent: SnapSheetPhysics(
stops: stops ?? <double>[0, 1],
parent: physics,
));
if (!draggable) {
_physics = 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: _physics,
controller: sheetController,
child: Builder(builder: builder),
);
}