diff options
Diffstat (limited to 'lib/models/popular_video.dart')
-rw-r--r-- | lib/models/popular_video.dart | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/models/popular_video.dart b/lib/models/popular_video.dart new file mode 100644 index 0000000..b626431 --- /dev/null +++ b/lib/models/popular_video.dart @@ -0,0 +1,32 @@ +class PopularVideo { + String? name; + String? key; + String? site; + int? size; + String? type; + bool? official; + String? id; + + PopularVideo({ + this.name, + this.key, + this.site, + this.size, + this.type, + this.official, + this.id, + }); + + factory PopularVideo.fromMap(Map<String, dynamic> map) { + print(map.toString()); + return PopularVideo( + id: map['id'], + key: map['key'], + name: map['name'], + site: map['site'], + size: map['size'], + type: map['type'], + official: map['official'], + ); + } +} |