opt.: performance

This commit is contained in:
lollipopkit
2023-09-07 18:41:18 +08:00
parent 3b698fc062
commit b55b8bf831
15 changed files with 50 additions and 39 deletions

View File

@@ -12,7 +12,7 @@ class Backup {
final Map<String, dynamic> dockerHosts;
final Map<String, dynamic> settings;
Backup({
const Backup({
required this.version,
required this.date,
required this.spis,

View File

@@ -4,12 +4,12 @@ import '../../../core/extension/context.dart';
class DynamicColor {
/// 白天模式显示的颜色
Color light;
final Color light;
/// 暗黑模式显示的颜色
Color dark;
final Color dark;
DynamicColor(this.light, this.dark);
const DynamicColor(this.light, this.dark);
Color resolve(BuildContext context) => context.isDark ? dark : light;
}

View File

@@ -30,7 +30,7 @@ import 'dart:convert';
import '/core/utils/platform.dart';
class AppUpdate {
AppUpdate({
const AppUpdate({
required this.changelog,
required this.build,
required this.url,