IconicaAlertDialog.singleButton constructor

IconicaAlertDialog.singleButton(
  1. {required String title,
  2. required String body,
  3. required String buttonText,
  4. required VoidCallback onPressed,
  5. bool primary = false,
  6. bool? closeButton,
  7. ButtonCallback? primaryButton,
  8. ButtonCallback? secondaryButton,
  9. IconButtonCallback? iconButton}
)

Implementation

factory IconicaAlertDialog.singleButton({
  required String title,
  required String body,
  required String buttonText,
  required VoidCallback onPressed,
  bool primary = false,
  bool? closeButton,
  ButtonCallback? primaryButton,
  ButtonCallback? secondaryButton,
  IconButtonCallback? iconButton,
}) =>
    IconicaAlertDialog.multiButton(
      primaryButton: primaryButton,
      secondaryButton: secondaryButton,
      iconButton: iconButton,
      closeButton: closeButton,
      title: title,
      body: body,
      buttons: [
        AlertDialogAction(
          text: buttonText,
          onPressed: onPressed,
          primary: primary,
        ),
      ],
    );