initialize method
Implementation
Future<void> initialize() async {
switch (_intializedType) {
case _SubtitleIntializeType.network:
final response = await http.get(Uri.parse(_url));
if (response.statusCode == 200) {
content = utf8.decode(response.bodyBytes);
_getSubtitlesData();
}
break;
case _SubtitleIntializeType.string:
_getSubtitlesData();
break;
}
}