I am new to Flutter, I try to run one GitHub project but got an error like type List dynamic is not a subtype of type List int where. Github Link
Error Line
List<int> genreIds;
MediaItem._internalFromJson(Map jsonMap, {MediaType type: MediaType.movie})
:
type = type,
id = jsonMap["id"].toInt(),
voteAverage = jsonMap["vote_average"].toDouble(),
title = jsonMap[(type == MediaType.movie ? "title" : "name")],
posterPath = jsonMap["poster_path"] ?? "",
backdropPath = jsonMap["backdrop_path"] ?? "",
overview = jsonMap["overview"],
releaseDate = jsonMap[(type == MediaType.movie
? "release_date"
: "first_air_date")],
genreIds = jsonMap["genre_ids"];//in this line
}
Above code File
Any help will be appreciated, thank you in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…