buildAlertDialogPreview function

Widget buildAlertDialogPreview(
  1. AlertDialogState state
)

Alert Dialog preview builder Category 3: Static/Display (No Interactive States) Just shows a single default state

Implementation

Widget buildAlertDialogPreview(AlertDialogState state) {
  return Builder(
    builder: (context) {
      final isDark = Theme.of(context).brightness == Brightness.dark;

      return Center(
        child: NeumorphicAlertDialog(
          // Dimensions
          width: state.width,
          padding: state.padding,
          titleMessageSpacing: state.titleMessageSpacing,
          messageButtonSpacing: state.messageButtonSpacing,
          buttonSpacing: state.buttonSpacing,

          // Text Content
          title: state.title,
          message: state.message,
          confirmText: state.confirmText,
          cancelText: state.cancelText,

          // Text Styling
          titleFontSize: state.titleFontSize,
          messageFontSize: state.messageFontSize,
          buttonFontSize: state.buttonFontSize,
          titleFontWeight: state.titleFontWeight,
          messageFontWeight: state.messageFontWeight,
          confirmFontWeight: state.confirmFontWeight,
          cancelFontWeight: state.cancelFontWeight,

          // Colors
          baseColor: state.getBaseColor(isDark),
          titleColor: state.getTitleColor(isDark),
          messageColor: state.getMessageColor(isDark),
          confirmColor: state.getConfirmColor(isDark),
          cancelColor: state.getCancelColor(isDark),

          // Neumorphic Properties
          distance: state.distance,
          blur: state.blur,
          borderRadius: state.borderRadius,

          // Button properties
          buttonDistance: state.getButtonDistance(),
          buttonBlur: state.getButtonBlur(),
          buttonRadius: state.getButtonRadius(),
          buttonPaddingH: state.buttonPaddingH,
          buttonPaddingV: state.buttonPaddingV,

          // Callbacks (just print for preview)
          onConfirm: () => print('Confirm pressed'),
          onCancel: () => print('Cancel pressed'),
        ),
      );
    },
  );
}