fromJson static method

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

Implementation

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

  switch (json['@type']) {
    case InputStoryAreaTypeFoundVenue.constructor:
      return InputStoryAreaTypeFoundVenue.fromJson(json);

    case InputStoryAreaTypeLink.constructor:
      return InputStoryAreaTypeLink.fromJson(json);

    case InputStoryAreaTypeLocation.constructor:
      return InputStoryAreaTypeLocation.fromJson(json);

    case InputStoryAreaTypeMessage.constructor:
      return InputStoryAreaTypeMessage.fromJson(json);

    case InputStoryAreaTypePreviousVenue.constructor:
      return InputStoryAreaTypePreviousVenue.fromJson(json);

    case InputStoryAreaTypeSuggestedReaction.constructor:
      return InputStoryAreaTypeSuggestedReaction.fromJson(json);

    case InputStoryAreaTypeUpgradedGift.constructor:
      return InputStoryAreaTypeUpgradedGift.fromJson(json);

    case InputStoryAreaTypeWeather.constructor:
      return InputStoryAreaTypeWeather.fromJson(json);

    default:
      return null;
  }
}