fromMap static method

PremiumStoryFeature? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static PremiumStoryFeature? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'premiumStoryFeatureSaveStories':
      return PremiumStoryFeatureSaveStories.fromMap(_map);
    case 'premiumStoryFeaturePermanentViewsHistory':
      return PremiumStoryFeaturePermanentViewsHistory.fromMap(_map);
    case 'premiumStoryFeatureLinksAndFormatting':
      return PremiumStoryFeatureLinksAndFormatting.fromMap(_map);
    case 'premiumStoryFeatureStealthMode':
      return PremiumStoryFeatureStealthMode.fromMap(_map);
    case 'premiumStoryFeatureCustomExpirationDuration':
      return PremiumStoryFeatureCustomExpirationDuration.fromMap(_map);
    case 'premiumStoryFeaturePriorityOrder':
      return PremiumStoryFeaturePriorityOrder.fromMap(_map);
    case null:
    default:
      return null;
  }
}