bottomMaterialDialog static method

void bottomMaterialDialog({
  1. required BuildContext context,
  2. dynamic onClose(
    1. dynamic value
    )?,
  3. String? title,
  4. String? msg,
  5. List<Widget>? actions,
  6. Widget customView = holder,
  7. CustomViewPosition customViewPosition = CustomViewPosition.BEFORE_TITLE,
  8. LottieBuilder? lottieBuilder,
  9. bool barrierDismissible = true,
  10. ShapeBorder dialogShape = BottomSheetShape,
  11. TextStyle titleStyle = titleStyle,
  12. TextStyle? msgStyle,
  13. Color color = bcgColor,
  14. bool isScrollControlled = false,
  15. bool useRootNavigator = false,
  16. bool isDismissible = true,
  17. bool enableDrag = true,
  18. RouteSettings? routeSettings,
  19. AnimationController? transitionAnimationController,
})

Displays bottom sheet Material dialog above the current contents of the app

Implementation

static void bottomMaterialDialog({
  required BuildContext context,
  Function(dynamic value)? onClose,
  String? title,
  String? msg,
  List<Widget>? actions,
  Widget customView = holder,
  CustomViewPosition customViewPosition = CustomViewPosition.BEFORE_TITLE,
  LottieBuilder? lottieBuilder,
  bool barrierDismissible = true,
  ShapeBorder dialogShape = BottomSheetShape,
  TextStyle titleStyle = titleStyle,
  TextStyle? msgStyle,
  Color color = bcgColor,
  bool isScrollControlled = false,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
}) {
  showModalBottomSheet(
    context: context,
    shape: dialogShape,
    backgroundColor: color,
    isScrollControlled: isScrollControlled,
    useRootNavigator: useRootNavigator,
    isDismissible: isDismissible,
    enableDrag: enableDrag,
    routeSettings: routeSettings,
    transitionAnimationController: transitionAnimationController,
    builder: (context) => DialogWidget(
      title: title,
      msg: msg,
      actions: actions,
      animationBuilder: lottieBuilder,
      customView: customView,
      customViewPosition: customViewPosition,
      titleStyle: titleStyle,
      msgStyle: msgStyle,
      color: color,
    ),
  ).then((value) => onClose?.call(value));
}