showQudsDialog<T> function

Future<T?> showQudsDialog<T>(
  1. BuildContext context, {
  2. Widget? child,
  3. Widget builder(
    1. BuildContext context
    )?,
  4. EdgeInsets insetPadding = _defaultDialogInsetPadding,
  5. Widget? title,
  6. List<Widget>? actions,
  7. List<Widget>? leadingActions,
  8. AlignmentGeometry alignment = Alignment.center,
  9. Color? backgroundColor,
  10. Color? barrierColor,
  11. BorderRadius? borderRadius,
  12. bool withBlur = false,
  13. bool withAnimatedSize = true,
})

Show a dialog with already defined components like title, body, bottom actions, leading icon.

Implementation

Future<T?> showQudsDialog<T>(BuildContext context,
    {Widget? child,
    Widget Function(BuildContext context)? builder,
    EdgeInsets insetPadding = _defaultDialogInsetPadding,
    Widget? title,
    List<Widget>? actions,
    List<Widget>? leadingActions,
    AlignmentGeometry alignment = Alignment.center,
    Color? backgroundColor,
    Color? barrierColor,
    BorderRadius? borderRadius,
    bool withBlur = false,
    bool withAnimatedSize = true}) async {
  return await showDialog<T>(
      context: context,
      barrierColor:
          barrierColor ?? (!withBlur ? Colors.black54 : Colors.black12),
      builder: (c) => _QudsDialog(
            context: context,
            child: child ?? (builder == null ? null : builder(context)),
            insetPadding: insetPadding,
            actions: actions,
            alignment: alignment,
            leadingActions: leadingActions,
            title: title,
            withBlur: withBlur,
            borderRadis: borderRadius,
            backgroundColor: backgroundColor,
            withAnimatedSize: withAnimatedSize,
          ));
}