getSubtitle method
Abstract method return an instance of SubtitleObject.
Implementation
@override
Future<SubtitleObject> getSubtitle() async {
// Preparing subtitle file data.
final repository = SubtitleRepository.inctance;
final data = await repository.fetchFromFile(file);
// Find the current format type of subtitle.
final ext = extension(file.path);
final type = this.type ?? getSubtitleType(ext);
return SubtitleObject(data: data, type: type);
}