TTVideoEngineLoadProgress.fromJson constructor
TTVideoEngineLoadProgress.fromJson(
- Map json
Implementation
factory TTVideoEngineLoadProgress.fromJson(Map<dynamic, dynamic> json) => TTVideoEngineLoadProgress(
videoId: json["videoId"] as String,
taskType: TTVideoEngineDataLoaderTaskType.values[json['taskType'] as int],
cacheState: TTVideoEngineCacheState.values[json["cacheState"] as int],
preloadComplete: json["preloadComplete"] ?? false,
cacheEnd: json["cacheEnd"] ?? false,
totalCacheSize: json["totalCacheSize"] as int,
totalMediaSize: json["totalMediaSize"] as int,
cacheInfos: json["cacheInfos"] == null
? []
: List<TTVideoEngineLoadCacheInfo>.from(
json["cacheInfos"]!.map((x) => TTVideoEngineLoadCacheInfo.fromJson(x))),
);