AppStoreAppDetails.fromJSON constructor

AppStoreAppDetails.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

factory AppStoreAppDetails.fromJSON(Map<String, dynamic> json) {
  return AppStoreAppDetails(
    id: json['id'] as num,
    appId: json['appId'] as String,
    title: json['title'] as String,
    url: json['url'] as String,
    description: json['description'] as String,
    icon: json['icon'] as String,
    genres: (json['genres'] as List<dynamic>).cast<String>(),
    genreIds: (json['genreIds'] as List<dynamic>).cast<String>(),
    primaryGenre: json['primaryGenre'] as String,
    primaryGenreId: json['primaryGenreId'] as num,
    contentRating: json['contentRating'] as String,
    languages: (json['languages'] as List<dynamic>).cast<String>(),
    size: json['size'] as String,
    requiredOsVersion: json['requiredOsVersion'] as String,
    released: DateTime.parse(json['released'] as String),
    updated: DateTime.parse(json['updated'] as String),
    releaseNotes: json['releaseNotes'] as String,
    version: json['version'] as String,
    price: json['price'] as num,
    currency: json['currency'] as String,
    free: json['free'] as bool,
    developerId: json['developerId'] as num,
    developer: json['developer'] as String,
    developerUrl: json['developerUrl'] as String,
    developerWebsite: json['developerWebsite'] as String,
    score: json['score'] as num,
    reviews: json['reviews'] as num,
    currentVersionScore: json['currentVersionScore'] as num,
    currentVersionReviews: json['currentVersionReviews'] as num,
    screenshots: (json['screenshots'] as List<dynamic>).cast<String>(),
    ipadScreenshots:
        (json['ipadScreenshots'] as List<dynamic>).cast<String>(),
    appletvScreenshots:
        (json['appletvScreenshots'] as List<dynamic>).cast<String>(),
    supportedDevices:
        (json['supportedDevices'] as List<dynamic>).cast<String>(),
  );
}