weatherTimePeriodDTONullableFromJson function
- Object? weatherTimePeriodDTO, [
- WeatherTimePeriodDTO? defaultValue
Implementation
enums.WeatherTimePeriodDTO? weatherTimePeriodDTONullableFromJson(
Object? weatherTimePeriodDTO, [
enums.WeatherTimePeriodDTO? defaultValue,
]) {
if (weatherTimePeriodDTO == null) {
return null;
}
return enums.WeatherTimePeriodDTO.values
.firstWhereOrNull((e) => e.value == weatherTimePeriodDTO) ??
defaultValue;
}