refa: subtitle

Closes #553

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-28 15:56:45 +08:00
parent 5655e6ccdf
commit f36f8d69fc
8 changed files with 98 additions and 149 deletions

View File

@@ -11,7 +11,7 @@ extension SubtitlePreferenceDesc on SubtitlePreference {
extension SubtitlePreferenceCode on SubtitlePreference {
static final List<String> _codeList = ['off', 'on', 'withoutAi'];
get code => _codeList[index];
String get code => _codeList[index];
static SubtitlePreference? fromCode(String code) {
final index = _codeList.indexOf(code);