SubtitleRepository class

Created to load the subtitles as a string from with value need to use futrue. Deals with the platform directly to get or download the required data and submit it to the provider.

It will throw an ErrorInternetFetchingSubtitle if failed to fetch subtitle or the successHttpStatus not matched.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchFromFile(File file) Future<String>
Load the subtitles from specific file.
override
fetchFromNetwork(Uri url, {Duration? connectionTimeout, Map<String, String>? headers, bool badCertificateCallback(X509Certificate cert, String host, int port)?, int successHttpStatus = HttpStatus.ok}) Future<String>
Load the subtitles from network by provide the file url.
override
get(Uri url, {Duration? connectionTimeout, Map<String, String>? headers, bool badCertificateCallback(X509Certificate cert, String host, int port)?}) Future<Response>
Simple method enable you to create a http GET request.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

inctance → const SubtitleRepository