openAndroidMenu<T> function

Future<T?> openAndroidMenu<T>(
  1. BuildContext context, {
  2. required WidgetBuilder builder,
  3. bool displayDragHandle = true,
  4. bool dismissible = true,
  5. bool draggable = true,
  6. PathRouteSettings? settings,
  7. double? width,
  8. double? height,
  9. bool expand = false,
  10. bool useRootNavigator = true,
  11. bool nestModals = false,
  12. Constraints? constraints,
})

Implementation

Future<T?> openAndroidMenu<T>(
  BuildContext context, {
  required WidgetBuilder builder,
  bool displayDragHandle = true,
  bool dismissible = true,
  bool draggable = true,
  PathRouteSettings? settings,
  double? width,
  double? height,
  bool expand = false,
  bool useRootNavigator = true,
  bool nestModals = false,
  Constraints? constraints,
}) {
  Widget? w;

  return showMaterialModalBottomSheet<T>(
    context: context,
    useRootNavigator: useRootNavigator,
    bounce: true,
    expand: expand,
    enableDrag: draggable,
    backgroundColor: sunnyColors.modalBackground,
    isDismissible: dismissible,
    builder: (context) {
      return w ??= displayDragHandle
          ? builder(context).withDragHandle()
          : builder(context);
    },
  );
}