基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。
modify decoder setting page
ErBW_sc3f2caf48d9f
diff --git a/lib/pages/settings/decoder_settings.dart b/lib/pages/settings/decoder_settings.dartindex 7bba6706..dbad69cb 100644--- a/lib/pages/settings/decoder_settings.dart+++ b/lib/pages/settings/decoder_settings.dart@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';import 'package:hive/hive.dart';import 'package:kazumi/utils/storage.dart';import 'package:kazumi/utils/constants.dart';+import 'package:card_settings_ui/card_settings_ui.dart';class DecoderSettings extends StatefulWidget {const DecoderSettings({super.key});@@ -22,38 +23,33 @@ class _DecoderSettingsState extends State<DecoderSettings> {appBar: AppBar(title: const Text('硬件解码器'),),- body: Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- Padding(- padding: const EdgeInsets.only(left: 25, top: 10, bottom: 5),- child: Text(- '选择不受支持的解码器将回退到软件解码',- textAlign: TextAlign.left,- style: TextStyle(color: Theme.of(context).colorScheme.outline),- ),+ body: Center(+ child: SizedBox(+ width: (MediaQuery.of(context).size.width > 1000) ? 1000 : null,+ child: SettingsList(+ sections: [+ SettingsSection(+ title: const Text('选择不受支持的解码器将回退到软件解码'),+ tiles: hardwareDecodersList.entries+ .map((e) => SettingsTile<String>.radioTile(+ title: Text(e.key),+ description: Text(e.value),+ radioValue: e.key,+ groupValue: decoder.value,+ onChanged: (String? value) {+ if (value != null) {+ setting.put(SettingBoxKey.hardwareDecoder, value);+ setState(() {+ decoder.value = value;+ });+ }+ },+ ))+ .toList(),+ ),+ ],),- Expanded(- child: ListView(- children: hardwareDecodersList.entries- .map((e) => RadioListTile<String>(- title: Text(e.key),- subtitle: Text(e.value),- value: e.key,- groupValue: decoder.value,- onChanged: (String? value) {- if (value != null) {- setting.put(SettingBoxKey.hardwareDecoder, value);- setState(() {- decoder.value = value;- });- }- },- ))- .toList(),- ),- ),- ],+ ),),);}