adaptive_dialog icon indicating copy to clipboard operation
adaptive_dialog copied to clipboard

Alert message error

Open KavinduDissanayake opened this issue 2 years ago • 1 comments

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

`

Future<OkCancelResult> 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 avatar Jun 29 '22 19:06 KavinduDissanayake

@KavinduDissanayake

Please paste full main.dart code.

mono0926 avatar Jul 28 '22 10:07 mono0926