remove warning
This commit is contained in:
@ -67,7 +67,7 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||
dense: false,
|
||||
title: Text('默认画质', style: titleStyle),
|
||||
subtitle: Text(
|
||||
'当前画质' + VideoQualityCode.fromCode(defaultVideoQa)!.description!,
|
||||
'当前画质${VideoQualityCode.fromCode(defaultVideoQa)!.description!}',
|
||||
style: subTitleStyle,
|
||||
),
|
||||
trailing: PopupMenuButton(
|
||||
@ -92,7 +92,7 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||
dense: false,
|
||||
title: Text('默认音质', style: titleStyle),
|
||||
subtitle: Text(
|
||||
'当前音质' + AudioQualityCode.fromCode(defaultAudioQa)!.description!,
|
||||
'当前音质${AudioQualityCode.fromCode(defaultAudioQa)!.description!}',
|
||||
style: subTitleStyle,
|
||||
),
|
||||
trailing: PopupMenuButton(
|
||||
@ -117,8 +117,7 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||
dense: false,
|
||||
title: Text('默认解码格式', style: titleStyle),
|
||||
subtitle: Text(
|
||||
'当前解码格式' +
|
||||
VideoDecodeFormatsCode.fromCode(defaultDecode)!.description!,
|
||||
'当前解码格式${VideoDecodeFormatsCode.fromCode(defaultDecode)!.description!}',
|
||||
style: subTitleStyle,
|
||||
),
|
||||
trailing: PopupMenuButton(
|
||||
@ -143,9 +142,7 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||
dense: false,
|
||||
title: Text('默认全屏方式', style: titleStyle),
|
||||
subtitle: Text(
|
||||
'当前全屏方式:' +
|
||||
FullScreenModeCode.fromCode(defaultFullScreenMode)!
|
||||
.description,
|
||||
'当前全屏方式:${FullScreenModeCode.fromCode(defaultFullScreenMode)!.description}',
|
||||
style: subTitleStyle,
|
||||
),
|
||||
trailing: PopupMenuButton(
|
||||
|
||||
@ -7,10 +7,6 @@ class SettingPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
TextStyle subTitleStyle = Theme.of(context)
|
||||
.textTheme
|
||||
.labelMedium!
|
||||
.copyWith(color: Theme.of(context).colorScheme.outline);
|
||||
final SettingController settingController = Get.put(SettingController());
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
||||
@ -19,8 +19,8 @@ class SetSelectItem extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _SetSelectItemState extends State<SetSelectItem> {
|
||||
Box Setting = GStrorage.setting;
|
||||
late var currentVal;
|
||||
Box setting = GStrorage.setting;
|
||||
late dynamic currentVal;
|
||||
late int currentIndex;
|
||||
late List menus;
|
||||
late List<PopupMenuEntry> popMenuItems;
|
||||
@ -33,7 +33,7 @@ class _SetSelectItemState extends State<SetSelectItem> {
|
||||
case 'defaultVideoQa':
|
||||
defaultVal = VideoQuality.values.last.description;
|
||||
List<VideoQuality> list = menus = VideoQuality.values.reversed.toList();
|
||||
currentVal = Setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
currentVal = setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
currentIndex =
|
||||
list.firstWhere((i) => i.description == currentVal).index;
|
||||
|
||||
@ -50,7 +50,7 @@ class _SetSelectItemState extends State<SetSelectItem> {
|
||||
case 'defaultAudioQa':
|
||||
defaultVal = AudioQuality.values.last.description;
|
||||
List<AudioQuality> list = menus = AudioQuality.values.reversed.toList();
|
||||
currentVal = Setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
currentVal = setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
currentIndex =
|
||||
list.firstWhere((i) => i.description == currentVal).index;
|
||||
|
||||
@ -65,7 +65,7 @@ class _SetSelectItemState extends State<SetSelectItem> {
|
||||
break;
|
||||
case 'defaultDecode':
|
||||
defaultVal = VideoDecodeFormats.values[0].description;
|
||||
currentVal = Setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
currentVal = setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
List<VideoDecodeFormats> list = menus = VideoDecodeFormats.values;
|
||||
|
||||
currentIndex =
|
||||
@ -82,7 +82,7 @@ class _SetSelectItemState extends State<SetSelectItem> {
|
||||
break;
|
||||
case 'defaultVideoSpeed':
|
||||
defaultVal = '1.0';
|
||||
currentVal = Setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
currentVal = setting.get(widget.setKey, defaultValue: defaultVal);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user