podcast overview
This commit is contained in:
parent
7f0d0689f8
commit
3a0622939e
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:didvan/models/category.dart';
|
||||
import 'package:html/parser.dart';
|
||||
|
||||
class OverviewData {
|
||||
final int id;
|
||||
|
|
@ -33,11 +34,15 @@ class OverviewData {
|
|||
this.categories,
|
||||
});
|
||||
|
||||
factory OverviewData.fromJson(Map<String, dynamic> json) => OverviewData(
|
||||
factory OverviewData.fromJson(Map<String, dynamic> json) {
|
||||
final document = parse(json['description']);
|
||||
final String parsedString =
|
||||
parse(document.body!.text).documentElement!.text;
|
||||
return OverviewData(
|
||||
id: json['id'],
|
||||
title: json['title'],
|
||||
image: json['image'],
|
||||
description: json['description'],
|
||||
description: parsedString,
|
||||
timeToRead: json['timeToRead'],
|
||||
reference: json['reference'],
|
||||
forManagers: json['forManagers'] ?? false,
|
||||
|
|
@ -55,6 +60,7 @@ class OverviewData {
|
|||
)
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue