operator == method
判断两个字幕是否相等。
Determines whether two subtitles are equal.
Two subtitles are considered equal when both index and text match.
Implementation
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is Subtitle && other.index == index && other.text == text;
}