fromJson static method

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

Implementation

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

  return RestrictionInfo(
    restrictionReason: (json['restriction_reason'] as String?) ?? '',
    hasSensitiveContent: (json['has_sensitive_content'] as bool?) ?? false,
  );
}