fluent2BottomSheetPlace function
child, a bottom sheet's card, where it stands on ui_core's bottom sheet
route: across a phone, centred over the window's foot from 600 at most
Fluent's dialog width (Fluent2ChromeMetrics.dialogWidth), at most
maxHeight tall; as tall as its content, or with fill as tall as the
route lays it out (a page sheet's resting size).
Implementation
Widget fluent2BottomSheetPlace({
required double maxHeight,
required Widget child,
bool fill = false,
}) => Align(
alignment: Alignment.bottomCenter,
heightFactor: 1,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: Fluent2ChromeMetrics.dialogWidth,
maxHeight: maxHeight,
),
child: SizedBox(
width: double.infinity,
height: fill ? double.infinity : null,
child: child,
),
),
);