webhookOperationNullableFromJson function

WebhookOperation? webhookOperationNullableFromJson(
  1. Object? webhookOperation, [
  2. WebhookOperation? defaultValue
])

Implementation

enums.WebhookOperation? webhookOperationNullableFromJson(
  Object? webhookOperation, [
  enums.WebhookOperation? defaultValue,
]) {
  if (webhookOperation == null) {
    return null;
  }
  return enums.WebhookOperation.values
          .firstWhereOrNull((e) => e.value == webhookOperation) ??
      defaultValue;
}