dispose method
void
dispose()
override
Implementation
void dispose() {
super.dispose();
_theoPlayerTextTracks.removeEventListener(TextTracksEventTypes.ADDTRACK.toLowerCase(), addTrackEventListener);
_theoPlayerTextTracks.removeEventListener(TextTracksEventTypes.REMOVETRACK.toLowerCase(), removeTrackEventListener);
_theoPlayerTextTracks.removeEventListener(TextTracksEventTypes.CHANGE.toLowerCase(), changeTrackEventListener);
forEach((element) {
dispatchEvent(RemoveTextTrackEvent(track: element));
(element as TextTrackImplWeb).dispose();
});
clear();
}