mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 调整设置,支持导入导出,代码优化
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user