Item.fromJson constructor

Item.fromJson({
  1. required Map<String, dynamic>? json,
  2. ResultType type = ResultType.itunes,
})

Takes our json map and builds a Podcast instance from it.

Implementation

factory Item.fromJson({
  required Map<String, dynamic>? json,
  ResultType type = ResultType.itunes,
}) {
  return type == ResultType.itunes ? _fromItunes(json!) : _fromPodcastIndex(json!);
}