bottomMaterialDialog static method

void bottomMaterialDialog({
  1. required BuildContext context,
  2. dynamic onClose(
    1. dynamic value
    )?,
  3. String? title,
  4. String? msg,
  5. @Deprecated('The actions is Deprecated, please use actionsBuilder') List<Widget>? actions,
  6. dynamic actionsBuilder(
    1. BuildContext context
    )?,
  7. Widget customView = holder,
  8. CustomViewPosition customViewPosition = CustomViewPosition.BEFORE_TITLE,
  9. LottieBuilder? lottieBuilder,
  10. bool barrierDismissible = true,
  11. ShapeBorder dialogShape = BottomSheetShape,
  12. TextStyle titleStyle = titleStyle,
  13. TextStyle? msgStyle,
  14. Color color = bcgColor,
  15. bool isScrollControlled = false,
  16. bool useRootNavigator = false,
  17. bool isDismissible = true,
  18. bool enableDrag = true,
  19. RouteSettings? routeSettings,
  20. 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,
  @Deprecated('The actions is Deprecated, please use actionsBuilder') List<Widget>? actions,
  Function(BuildContext context)? actionsBuilder,
  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: actionsBuilder != null ? actionsBuilder(context) : actions,
      animationBuilder: lottieBuilder,
      customView: customView,
      customViewPosition: customViewPosition,
      titleStyle: titleStyle,
      msgStyle: msgStyle,
      color: color,
    ),
  ).then((value) => onClose?.call(value));
}