v1SharedVoicesGetCategoryNullableFromJson function

V1SharedVoicesGetCategory? v1SharedVoicesGetCategoryNullableFromJson(
  1. Object? v1SharedVoicesGetCategory, [
  2. V1SharedVoicesGetCategory? defaultValue
])

Implementation

enums.V1SharedVoicesGetCategory? v1SharedVoicesGetCategoryNullableFromJson(
  Object? v1SharedVoicesGetCategory, [
  enums.V1SharedVoicesGetCategory? defaultValue,
]) {
  if (v1SharedVoicesGetCategory == null) {
    return null;
  }
  return enums.V1SharedVoicesGetCategory.values
          .firstWhereOrNull((e) => e.value == v1SharedVoicesGetCategory) ??
      defaultValue;
}