feat: 调整设置,支持导入导出,代码优化

This commit is contained in:
orz12
2024-04-27 02:05:50 +08:00
parent a4d3713b05
commit ea8f44f4da
41 changed files with 882 additions and 424 deletions

View File

@@ -11,6 +11,7 @@ class SetSwitchItem extends StatefulWidget {
final bool? defaultVal;
final Function? callFn;
final bool? needReboot;
final Widget? leading;
const SetSwitchItem({
this.title,
@@ -19,6 +20,7 @@ class SetSwitchItem extends StatefulWidget {
this.defaultVal,
this.callFn,
this.needReboot,
this.leading,
Key? key,
}) : super(key: key);
@@ -66,6 +68,7 @@ class _SetSwitchItemState extends State<SetSwitchItem> {
subtitle: widget.subTitle != null
? Text(widget.subTitle!, style: subTitleStyle)
: null,
leading: widget.leading,
trailing: Transform.scale(
alignment: Alignment.centerRight, // 缩放Switch的大小后保持右侧对齐, 避免右侧空隙过大
scale: 0.8,