commonBottomSheet function

dynamic commonBottomSheet({
  1. dynamic body,
  2. dynamic backgroundColor,
})

Implementation

commonBottomSheet({
  body,
  backgroundColor,
}) {
  return Get.bottomSheet(
      body ??
          Container(
            padding: EdgeInsets.all(margin_10),
            decoration: BoxDecoration(
                color: white,
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(radius_10),
                  topRight: Radius.circular(radius_10),
                )),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisSize: MainAxisSize.min,
              children: [
                CustomButton(
                  buttonText: "light Theme",
                  onClick: () {
                    Get.changeTheme(ThemeData.light());
                  },
                ),
                sizedBox(height: height_10),
                CustomButton(
                  buttonText: "dark Theme",
                  onClick: () {
                    Get.changeTheme(ThemeData.dark());
                  },
                )
              ],
            ),
          ),
      backgroundColor: backgroundColor ?? white,
      isScrollControlled: true);
}