mono0926/adaptive_dialog

Alert message error

KavinduDissanayake opened this issue · 1 comments

I was in this library but it does not show messages content I was pased the params as well

`

Future showOkCancelAlertDialog({ String? title,String? message, String? okLabel,
String? cancelLabel,
OkCancelAlertDefaultType? defaultType,
bool isDestructiveAction = false,
bool barrierDismissible = true,
@deprecated('Use style instead.') AdaptiveStyle? alertStyle,
AdaptiveStyle? style,
@deprecated('Use ios instead. Will be removed in v2.')
bool useActionSheetForCupertino = false,
bool useActionSheetForIOS = false,
bool useRootNavigator = true,
VerticalDirection actionsOverflowDirection = VerticalDirection.up,
bool fullyCapitalizedForMaterial = true,
WillPopCallback? onWillPop,
AdaptiveDialogBuilder? builder,
}) async {
final theme = Theme.of(Get.context!);
final adaptiveStyle = style ?? AdaptiveDialog.instance.defaultStyle;
final isMaterial = adaptiveStyle.isMaterial(theme);
String defaultCancelLabel() {
final label = MaterialLocalizations.of(Get.context!).cancelButtonLabel;
// return isMaterial ? label : label.capitalizedForce;
return label;

}

final result = await showAlertDialog<OkCancelResult>(
  context: Get.context!,
  title: title,
  message: message,
  barrierDismissible: barrierDismissible,
  style: alertStyle ?? style,
  useActionSheetForIOS: useActionSheetForCupertino || useActionSheetForIOS,
  useRootNavigator: useRootNavigator,
  actionsOverflowDirection: actionsOverflowDirection,
  fullyCapitalizedForMaterial: fullyCapitalizedForMaterial,
  onWillPop: onWillPop,
  builder: builder,
  actions: [
    AlertDialogAction(
      label: cancelLabel ?? defaultCancelLabel(),
      key: OkCancelResult.cancel,
      isDefaultAction: defaultType == OkCancelAlertDefaultType.cancel,
    ),
    AlertDialogAction(
      label: okLabel ?? MaterialLocalizations.of(Get.context!).okButtonLabel,
      key: OkCancelResult.ok,
      isDefaultAction:
      defaultType == null || defaultType == OkCancelAlertDefaultType.ok,
      isDestructiveAction: isDestructiveAction,
    ),
  ],
);
return result ?? OkCancelResult.cancel;

}`

showOkCancelAlertDialog(title: "Test",message: "Test")

image

@KavinduDissanayake

Please paste full main.dart code.