支持主题切换

This commit is contained in:
NewTab
2022-01-21 19:54:59 +08:00
parent b8b195b663
commit b9d0071302
12 changed files with 813 additions and 175 deletions

View File

@@ -15,6 +15,7 @@ import 'package:qinglong_app/module/others/scripts/script_edit_page.dart';
import 'package:qinglong_app/module/others/scripts/script_page.dart';
import 'package:qinglong_app/module/others/task_log/task_log_detail_page.dart';
import 'package:qinglong_app/module/others/task_log/task_log_page.dart';
import 'package:qinglong_app/module/others/theme_page.dart';
import 'package:qinglong_app/module/others/update_password_page.dart';
import 'package:qinglong_app/module/task/add_task_page.dart';
import 'package:qinglong_app/module/task/task_bean.dart';
@@ -39,6 +40,7 @@ class Routes {
static const String routeDependency = "/Dependency";
static const String routeUpdatePassword = "/updatePassword";
static const String routeAbout = "/about";
static const String routeTheme = "/theme";
static Route<dynamic>? generateRoute(RouteSettings settings) {
switch (settings.name) {
@@ -56,7 +58,8 @@ class Routes {
return CupertinoPageRoute(builder: (context) => const AddTaskPage());
}
case routeAddDependency:
return CupertinoPageRoute(builder: (context) => const AddDependencyPage());
return CupertinoPageRoute(
builder: (context) => const AddDependencyPage());
case routeAddEnv:
if (settings.arguments != null) {
return CupertinoPageRoute(
@@ -122,6 +125,10 @@ class Routes {
return CupertinoPageRoute(
builder: (context) => const AboutPage(),
);
case routeTheme:
return CupertinoPageRoute(
builder: (context) => const ThemePage(),
);
case routeScriptUpdate:
return CupertinoPageRoute(
builder: (context) => ScriptEditPage(