video.dart
790 Bytes
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
import 'dart:io';
Socket? socket;
var videoList = [
'test-video-10.MP4',
'test-video-6.mp4',
'test-video-9.MP4',
'test-video-8.MP4',
'test-video-7.MP4',
'test-video-1.mp4',
'test-video-2.mp4',
'test-video-3.mp4',
'test-video-4.mp4',
];
class UserVideo {
final String url;
final String image;
final String? desc;
UserVideo({
required this.url,
required this.image,
this.desc,
});
static List<UserVideo> fetchVideo() {
List<UserVideo> list = videoList
.map((e) => UserVideo(image: '', url: 'https://static.ybhospital.net/$e', desc: '清晨入古寺,初日照高林。\n竹径通幽处,禅房花木深。'))
.toList();
return list;
}
@override
String toString() {
return 'image:$image' '\nvideo:$url';
}
}