show<T> static method

Future<T?> show<T>({
  1. required BuildContext context,
  2. required Widget builder(
    1. BuildContext,
    2. void (
      1. Future<T> ()
      )
    ),
  3. bool isDarkTheme = false,
})

Implementation

static Future<T?> show<T>({
  required BuildContext context,
  required Widget Function(BuildContext, void Function(Future<T> Function())) builder,
  bool isDarkTheme = false,
}) {
  return showModalBottomSheet<T>(
    context: context,
    isScrollControlled: true, // allows full height scrollable sheet
    backgroundColor: isDarkTheme ? ColorResource.blackColor : Colors.white,
    shape: const RoundedRectangleBorder(
      borderRadius: BorderRadius.vertical(
        top: Radius.circular(12),
      ),
    ),
    builder: (context) {
      return _BottomSheetContent<T>(
        builder: builder,
      );
    },
  );
}