ezActionPair function

List<EzMaterialAction> ezActionPair({
  1. String? confirmMsg,
  2. required void onConfirm(),
  3. bool confirmIsDefault = false,
  4. bool confirmIsDestructive = false,
  5. String? denyMsg,
  6. required void onDeny(),
  7. bool denyIsDefault = false,
  8. bool denyIsDestructive = false,
  9. TextStyle? style,
})

Pairs with EzAlertDialog

Implementation

List<EzMaterialAction> ezActionPair({
  String? confirmMsg,
  required void Function() onConfirm,
  bool confirmIsDefault = false,
  bool confirmIsDestructive = false,
  String? denyMsg,
  required void Function() onDeny,
  bool denyIsDefault = false,
  bool denyIsDestructive = false,
  TextStyle? style,
}) =>
    <EzMaterialAction>[
      EzMaterialAction(
        text: denyMsg ?? EzConfig.l10n.gNo,
        onPressed: onDeny,
        isDefaultAction: denyIsDefault,
        isDestructiveAction: denyIsDestructive,
        style: style,
      ),
      EzMaterialAction(
        text: confirmMsg ?? EzConfig.l10n.gYes,
        onPressed: onConfirm,
        isDefaultAction: confirmIsDefault,
        isDestructiveAction: confirmIsDestructive,
        style: style,
      ),
    ];