StringSubtitle class

Use this provider for string to generate a subtitles. You should provide the current format type of this subtitle. for example:


String subtitleData = """
  WEBVTT

  00:01.000 --> 00:04.000
  - Never drink liquid nitrogen.

  00:05.000 --> 00:09.000
  - It will perforate your stomach.
  - You could die.
""";


  // Using  [StringSubtitle] class.
  StringSubtitle fileSub = new StringSubtitle(
    data: subtitleData,
    type: SubtitleType.vtt,
  );

  // Using factory constructor.
  SubtitleProvider fileSub = SubtitleProvider.fromString(
    data: subtitleData,
    type: SubtitleType.vtt,
   );

Inheritance

Constructors

StringSubtitle({required String data, required SubtitleType type})
const

Properties

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

Methods

getSubtitle() Future<SubtitleObject>
Abstract method return an instance of SubtitleObject.
override
getSubtitleType(String ext) SubtitleType
Return the current SubtitleType depended on file extension.
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