# Dialog

## Dialog

## MUIPrimaryDialog

A customizable primary dialog provided by Modular UI.

### Properties

* **`titleText`**: _String_ - Title of the dialog box that appears at the top.
* **`contentText`**: _String_ - The main content of the dialog box.
* **`dialogRadius`**: _double?_ - Border radius of the dialog box; default: 5.
* **`dialogBackgroundColor`**: _Color?_ - Color of the dialog box; default: white.
* **`titleStyle`**: _TextStyle?_ - Text style of the dialog box title; default: size=18, bold, color=black.
* **`contentStyle`**: _TextStyle?_ - Text style of the dialog box content; default: color=black54.
* **`buttons`**: _List?_ - List of buttons or widgets to be shown in the primary dialog box.
* **`buttonsAlignment`**: _MainAxisAlignment?_ - Main axis alignment for buttons.

### Methods

#### `showDialogBox(BuildContext context)`

Displays the primary dialog box.

#### Parameters

* **`context`**: _BuildContext_ - The build context of the widget.

#### Returns

* _Future_ - A Future that resolves to the result returned by the `showDialog` function.

### Example Usage

```dart
MUISecondaryOutlinedButton(
        text: 'Show Dialog Box',
        borderColor: Colors.grey.shade300,
        bgColor: Colors.white,
        onPressed: () {
          MUIPrimaryDialog(
              titleText: 'Alert Dialog',
              contentText:
                  'This action cannot be undone. This will permanently delete your account and remove your data from our servers.',
              buttonsAlignment: MainAxisAlignment.spaceEvenly,
              buttons: [
                MUISecondaryButton(
                    text: 'Cancel',
                    onPressed: () {
                      Navigator.pop(context);
                    }),
                MUISecondaryOutlinedButton(
                  text: 'Done',
                  onPressed: () {},
                  bgColor: Colors.grey.shade200,
                  borderColor: Colors.grey.shade300,
                )
              ]).showDialogBox(context);
        },
      ),
```

### **Notes**

* Provides a customizable dialog box with title, content, and action buttons.
* Supports customization of dialog box appearance, including title and content text styles.
* Allows the addition of action buttons with various styles and functionalities.

###
