showZetaDialog function

Future<bool?> showZetaDialog(
  1. BuildContext context, {
  2. ZetaDialogHeaderAlignment headerAlignment = ZetaDialogHeaderAlignment.center,
  3. Widget? icon,
  4. String? title,
  5. required String message,
  6. String? primaryButtonLabel,
  7. VoidCallback? onPrimaryButtonPressed,
  8. String? secondaryButtonLabel,
  9. VoidCallback? onSecondaryButtonPressed,
  10. String? tertiaryButtonLabel,
  11. VoidCallback? onTertiaryButtonPressed,
  12. bool? rounded,
  13. bool barrierDismissible = true,
  14. bool useRootNavigator = true,
})

Function to show a Zeta dialog.

Implementation

Future<bool?> showZetaDialog(
  BuildContext context, {
  ZetaDialogHeaderAlignment headerAlignment = ZetaDialogHeaderAlignment.center,
  Widget? icon,
  String? title,
  required String message,
  String? primaryButtonLabel,
  VoidCallback? onPrimaryButtonPressed,
  String? secondaryButtonLabel,
  VoidCallback? onSecondaryButtonPressed,
  String? tertiaryButtonLabel,
  VoidCallback? onTertiaryButtonPressed,
  bool? rounded,
  bool barrierDismissible = true,
  bool useRootNavigator = true,
}) =>
    showDialog<bool?>(
      context: context,
      barrierDismissible: barrierDismissible,
      useRootNavigator: useRootNavigator,
      builder: (_) => _ZetaDialog(
        headerAlignment: headerAlignment,
        icon: icon,
        title: title,
        message: message,
        primaryButtonLabel: primaryButtonLabel,
        onPrimaryButtonPressed: onPrimaryButtonPressed,
        secondaryButtonLabel: secondaryButtonLabel,
        onSecondaryButtonPressed: onSecondaryButtonPressed,
        tertiaryButtonLabel: tertiaryButtonLabel,
        onTertiaryButtonPressed: onTertiaryButtonPressed,
        rounded: rounded,
      ),
    );