first commit

This commit is contained in:
2025-06-24 19:54:42 +08:00
commit 6de931db7c
161 changed files with 11525 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
// video_model.dart
class VideoCategory {
final String name;
final List<VideoItemModel> videos;
VideoCategory({required this.name, required this.videos});
factory VideoCategory.fromJson(Map<String, dynamic> json) {
var videoList = json['videos'] as List;
List<VideoItemModel> videos = videoList
.map((video) => VideoItemModel.fromJson(video))
.toList();
return VideoCategory(
name: json['name'],
videos: videos,
);
}
}
class VideoItemModel {
final String description;
final List<String> sources;
final String subtitle;
final String thumb;
final String title;
VideoItemModel({
required this.description,
required this.sources,
required this.subtitle,
required this.thumb,
required this.title,
});
factory VideoItemModel.fromJson(Map<String, dynamic> json) {
var sources = json['sources'] as List;
return VideoItemModel(
description: json['description'],
sources: sources.cast<String>(),
subtitle: json['subtitle'],
thumb: json['thumb'],
title: json['title'],
);
}
}