修复代码格式

This commit is contained in:
2026-04-03 20:56:21 +08:00
parent d0f81bf18e
commit 668199ce3f
6 changed files with 87 additions and 67 deletions

View File

@@ -1,14 +1,14 @@
import 'dart:io';
/// 应用配置管理
///
///
/// 支持通过环境变量配置数据目录和缓存目录:
/// - `DATA_DIR`: 数据目录路径,默认为 `data`
/// - `CACHE_DIR`: 缓存目录路径,默认为 `cache`
class AppConfig {
/// 数据目录路径
final String dataDir;
/// 缓存目录路径
final String cacheDir;
@@ -20,8 +20,8 @@ class AppConfig {
/// 从环境变量创建配置
AppConfig._fromEnvironment()
: dataDir = Platform.environment['DATA_DIR'] ?? 'data',
cacheDir = Platform.environment['CACHE_DIR'] ?? 'cache';
: dataDir = Platform.environment['DATA_DIR'] ?? 'data',
cacheDir = Platform.environment['CACHE_DIR'] ?? 'cache';
/// 获取相册预览缓存目录
String get previewCacheDir => '$cacheDir/preview';
@@ -34,4 +34,4 @@ class AppConfig {
@override
String toString() => 'AppConfig(dataDir: $dataDir, cacheDir: $cacheDir)';
}
}