fromJson static method

InputStoryAreaTypeWeather? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static InputStoryAreaTypeWeather? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return InputStoryAreaTypeWeather(
    temperature: ((json['temperature'] as num?) ?? 0.0).toDouble(),
    emoji: (json['emoji'] as String?) ?? '',
    backgroundColor: (json['background_color'] as int?) ?? 0,
  );
}