mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 03:15:14 +08:00
chore: clean up
opt: pages Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:PiliPlus/models/common/nav_bar_config.dart';
|
||||
import 'package:PiliPlus/models/common/theme_type.dart';
|
||||
import 'package:PiliPlus/pages/home/index.dart';
|
||||
import 'package:PiliPlus/pages/mine/controller.dart';
|
||||
import 'package:PiliPlus/pages/setting/widgets/select_dialog.dart';
|
||||
import 'package:flex_seed_scheme/flex_seed_scheme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -67,6 +68,9 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
try {
|
||||
Get.find<MineController>().themeType.value = result;
|
||||
} catch (_) {}
|
||||
ctr.themeType.value = result;
|
||||
GStorage.setting.put(SettingBoxKey.themeMode, result.index);
|
||||
Get.changeThemeMode(result.toThemeMode);
|
||||
|
||||
@@ -12,7 +12,6 @@ class FontSizeSelectPage extends StatefulWidget {
|
||||
|
||||
class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
|
||||
List<double> list = List.generate(16, (index) => 0.85 + index * 0.05);
|
||||
//[0.85, 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35];
|
||||
late double minSize;
|
||||
late double maxSize;
|
||||
late double currentSize;
|
||||
|
||||
@@ -63,7 +63,7 @@ class _LogsPageState extends State<LogsPage> {
|
||||
if (l.startsWith("Crash occurred on")) {
|
||||
try {
|
||||
date = DateTime.parse(
|
||||
l.split("Crash occurred on")[1].trim(), //.split('.')[0],
|
||||
l.split("Crash occurred on")[1].trim(),
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint(e.toString());
|
||||
@@ -111,7 +111,6 @@ class _LogsPageState extends State<LogsPage> {
|
||||
actions: [
|
||||
PopupMenuButton<String>(
|
||||
onSelected: (String type) {
|
||||
// 处理菜单项选择的逻辑
|
||||
switch (type) {
|
||||
case 'copy':
|
||||
copyLogs();
|
||||
|
||||
@@ -82,7 +82,6 @@ class _PlaySpeedPageState extends State<PlaySpeedPage> {
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// const Text('输入你想要的视频倍速,例如:1.0'),
|
||||
const SizedBox(height: 12),
|
||||
TextField(
|
||||
autofocus: true,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:PiliPlus/http/login.dart';
|
||||
import 'package:PiliPlus/pages/about/index.dart';
|
||||
import 'package:PiliPlus/pages/about/view.dart';
|
||||
import 'package:PiliPlus/pages/login/controller.dart';
|
||||
import 'package:PiliPlus/pages/setting/extra_setting.dart';
|
||||
import 'package:PiliPlus/pages/setting/play_setting.dart';
|
||||
|
||||
@@ -131,10 +131,8 @@ List<SettingsModel> get styleSettings => [
|
||||
onChanged: (value) {
|
||||
if (value) {
|
||||
autoScreen();
|
||||
// SmartDialog.showToast('已开启横屏适配');
|
||||
} else {
|
||||
AutoOrientation.portraitUpMode();
|
||||
// SmartDialog.showToast('已关闭横屏适配');
|
||||
}
|
||||
}),
|
||||
SettingsModel(
|
||||
@@ -536,6 +534,9 @@ List<SettingsModel> get styleSettings => [
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
try {
|
||||
Get.find<MineController>().themeType.value = result;
|
||||
} catch (_) {}
|
||||
GStorage.setting.put(SettingBoxKey.themeMode, result.index);
|
||||
Get.put(ColorSelectController()).themeType.value = result;
|
||||
Get.changeThemeMode(result.toThemeMode);
|
||||
|
||||
@@ -133,7 +133,7 @@ class _SetSwitchItemState extends State<SetSwitchItem> {
|
||||
: null,
|
||||
leading: widget.leading,
|
||||
trailing: Transform.scale(
|
||||
alignment: Alignment.centerRight, // 缩放Switch的大小后保持右侧对齐, 避免右侧空隙过大
|
||||
alignment: Alignment.centerRight,
|
||||
scale: 0.8,
|
||||
child: Switch(
|
||||
thumbIcon:
|
||||
@@ -141,7 +141,7 @@ class _SetSwitchItemState extends State<SetSwitchItem> {
|
||||
if (states.isNotEmpty && states.first == WidgetState.selected) {
|
||||
return const Icon(Icons.done);
|
||||
}
|
||||
return null; // All other states will use the default thumbIcon.
|
||||
return null;
|
||||
}),
|
||||
value: val,
|
||||
onChanged: switchChange,
|
||||
|
||||
Reference in New Issue
Block a user