feat: 添加定向流量支持伪选项

This commit is contained in:
orz12
2024-08-18 17:08:36 +08:00
parent 73ae1d9633
commit 3362bd97b0

View File

@@ -85,6 +85,29 @@ class _VideoSettingState extends State<VideoSetting> {
setKey: SettingBoxKey.p1080,
defaultVal: true,
),
ListTile(
enabled: false,
onTap: null,
title: Text("b站定向流量支持", style: titleStyle),
subtitle:
Text("若套餐含b站定向流量则会自动使用。可查阅运营商的流量记录确认。", style: subTitleStyle),
leading: const Icon(Icons.perm_data_setting_outlined),
trailing: Transform.scale(
alignment: Alignment.centerRight, // 缩放Switch的大小后保持右侧对齐, 避免右侧空隙过大
scale: 0.8,
child: Switch(
thumbIcon: WidgetStateProperty.resolveWith<Icon?>(
(Set<WidgetState> states) {
if (states.isNotEmpty &&
states.first == WidgetState.selected) {
return const Icon(Icons.done);
}
return null; // All other states will use the default thumbIcon.
}),
value: true,
onChanged: null),
),
),
ListTile(
title: Text('CDN 设置', style: titleStyle),
leading: Icon(MdiIcons.cloudPlusOutline),