show static method

void show({
  1. required BuildContext context,
  2. required dynamic checkOutButton(
    1. List<CartItem> cartList
    ),
  3. required dynamic checkOutPaypalButton(
    1. List<CartItem> cartList
    ),
})

Implementation

static void show(
    {required BuildContext context,
    required Function(List<CartItem> cartList) checkOutButton,
    required Function(List<CartItem> cartList) checkOutPaypalButton}) {
  showModalBottomSheet(
    context: context,
    backgroundColor: Colors.grey[100],
    shape: const RoundedRectangleBorder(
      borderRadius: BorderRadius.vertical(
        top: Radius.circular(20),
      ),
    ),
    builder: (context) => BottomSheetCart(
        checkOutButton: checkOutButton,
        checkOutPaypalButton: checkOutPaypalButton),
  );
}