showBottomSheet static method

Future showBottomSheet(
  1. BuildContext context,
  2. Widget widget, {
  3. bool fixContent = false,
  4. bool useRootNavigator = false,
})

Implementation

static Future showBottomSheet(
  BuildContext context,
  Widget widget, {
  bool fixContent = false,
  bool useRootNavigator = false,
}) {
  double height = MediaQuery.of(context).size.height - 100;
  return showModalBottomSheet(
      context: context,
      isScrollControlled: true,
      useRootNavigator: useRootNavigator,
      backgroundColor: Colors.transparent,
      builder: (ctx) => SizedBox(
          width: double.infinity,
          height: fixContent ? null : height,
          child: widget));
}