{ + @_ConvertP() + final List
results;
+ @JsonKey(name: 'next_offset')
+ final int nextOffset;
+ final int total;
+ final int count;
+ SearchPodcast(
+ {this.results, this.nextOffset, this.total, this.count}
+ );
+ factory SearchPodcast.fromJson(Map (json);
+ Map implements JsonConverter {
+ const _ConvertP();
+ @override
+ P fromJson(Object json){
+ return OnlinePodcast.fromJson(json) as P;
+ }
+ @override
+ Object toJson(P object){
+ return object;
+ }
+}
+
+@JsonSerializable()
+class OnlinePodcast{
+ @JsonKey(name: 'earliest_pub_date_ms')
+ final int earliestPubDate;
+ @JsonKey(name: 'title_original')
+ final String title;
+ final String rss;
+ @JsonKey(name: 'lastest_pub_date_ms')
+ final int lastestPubDate;
+ @JsonKey(name: 'description_original')
+ final String description;
+ @JsonKey(name: 'total_episodes')
+ final int count;
+ final String image;
+ @JsonKey(name: 'publisher_original')
+ final String publisher;
+ OnlinePodcast(
+ {this.earliestPubDate, this.title, this.count, this.description, this.image, this.lastestPubDate, this.rss, this.publisher}
+ );
+ factory OnlinePodcast.fromJson(Map _$SearchPodcastFromJson (Map (
+ results: (json['results'] as List)
+ ?.map((e) => e == null ? null : _ConvertP ().fromJson(e))
+ ?.toList(),
+ nextOffset: json['next_offset'] as int,
+ total: json['total'] as int,
+ count: json['count'] as int);
+}
+
+Map (SearchPodcast instance) =>
+ ().toJson(e))
+ ?.toList(),
+ 'next_offset': instance.nextOffset,
+ 'total': instance.total,
+ 'count': instance.count
+ };
+
+OnlinePodcast _$OnlinePodcastFromJson(Map> getPodcastLocal() async {
+ var dbClient = await database;
+ List