trendV2PathParamNullableFromJson function

TrendV2PathParam? trendV2PathParamNullableFromJson(
  1. Object? trendV2PathParam, [
  2. TrendV2PathParam? defaultValue
])

Implementation

enums.TrendV2PathParam? trendV2PathParamNullableFromJson(
  Object? trendV2PathParam, [
  enums.TrendV2PathParam? defaultValue,
]) {
  if (trendV2PathParam == null) {
    return null;
  }
  return enums.TrendV2PathParam.values
          .firstWhereOrNull((e) => e.value == trendV2PathParam) ??
      defaultValue;
}