admin
2022-03-31 02f1c9fd2c594323f772f8e8f0f2187a285c1749
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import '../../model/video/video_model.dart';
 
/// Resource : {"Id":"22","Name":"爱奇艺2","Createtime":"1464659723000","Picture":"http://buwan-1255749512.cos.ap-guangzhou.myqcloud.com/resource/source/iqiyi.png","Checked":false}
/// Url : "http://m.iqiyi.com/v_19rrk83jpg.html?vfm=m_330_hjvap"
/// PlayType : 1
/// Params : ""
 
class VideoPlayUrlModel {
  VideoPlayUrlModel({
    VideoResource? resource,
    String? url,
    int? playType,
    String? params,
  }) {
    _resource = resource;
    _url = url;
    _playType = playType;
    _params = params;
  }
 
  VideoPlayUrlModel.fromJson(dynamic json) {
    _resource = json['Resource'] != null
        ? VideoResource.fromJson(json['Resource'])
        : null;
    _url = json['Url'];
    _playType = json['PlayType'];
    _params = json['Params'];
  }
 
  VideoResource? _resource;
  String? _url;
  int? _playType;
  String? _params;
 
  VideoResource? get resource => _resource;
 
  String? get url => _url;
 
  int? get playType => _playType;
 
  String? get params => _params;
 
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (_resource != null) {
      map['Resource'] = _resource?.toJson();
    }
    map['Url'] = _url;
    map['PlayType'] = _playType;
    map['Params'] = _params;
    return map;
  }
}