showBottomSheet static method

Future showBottomSheet(
  1. dynamic context, {
  2. Widget? content,
  3. bool dismissible = true,
  4. double? maxHeight,
  5. bool skipPadding = false,
})

Implementation

static Future showBottomSheet(context,
    {Widget? content, bool dismissible = true, double? maxHeight, bool skipPadding = false}) {
  return CustomShowModalBottomSheet.customShowModalBottomSheet(
    darkMode: Theme.of(context).brightness == Brightness.light,
    context: context,
    dismissible: dismissible,
    builder: (context) {
      return Container(
        constraints: BoxConstraints(maxHeight: maxHeight ?? double.infinity),
        padding: skipPadding
            ? null
            : EdgeInsets.only(
                bottom: DUI.spacing.lateralPaddingValue,
                left: DUI.spacing.lateralPaddingValue,
                right: DUI.spacing.lateralPaddingValue),
        decoration: BoxDecoration(
          color: Theme.of(context).colorScheme.background,
          borderRadius: BorderRadius.vertical(top: Radius.circular(DUI.spacing.largeBorderRadius)),
          boxShadow: [
            BoxShadow(
              color: Colors.black.withOpacity(0.2),
              blurRadius: 5.0,
              offset: const Offset(0.0, 0.0),
            ),
          ],
        ),
        child: Wrap(
          children: <Widget>[
            SafeArea(
              top: false,
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                  dismissible == true
                      ? Center(
                          child: Opacity(
                            opacity: 0.2,
                            child: Container(
                              width: 49,
                              height: 5.5,
                              decoration: BoxDecoration(
                                borderRadius: BorderRadius.circular(20),
                              ),
                            ),
                          ),
                        )
                      : DUI.spacing.spacer(multiplier: 2),
                  content ?? const SizedBox.shrink()
                ],
              ),
            ),
          ],
        ),
      );
    },
  );
}