diff --git a/CHANGELOG.md b/CHANGELOG.md index 449a53f3..2203ad8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -171,6 +171,20 @@ - `lib/app/services/desktop_services_manager.dart` — 延迟首次 applyEffect - `lib/app/services/theme_sync_service.dart` — 跳过首次窗口特效同步 +### 🔧 维护(pubspec.yaml 同步鸿蒙端模板) + +#### 1. pubspec.yaml 版本号与依赖同步鸿蒙端模板 +- **Issue**: `pubspec.yaml` 版本落后(6.6.22+2606213),且头部注释错误标注为"鸿蒙端模板",与 `pubspec.ohos.yaml` 模板(6.6.25+2606241)不同步 +- **原因**: 拉取 git 代码后未重新生成 `pubspec.yaml`,导致主文件与鸿蒙端模板版本号不一致 +- **修复**: + - 基于 `pubspec.ohos.yaml` 模板重新生成 `pubspec.yaml` + - 版本号升级:6.6.22+2606213 → 6.6.25+2606241 + - 头部注释修正为"主 pubspec.yaml(基于鸿蒙端模板生成)" + - 所有依赖项、本地包引用、dependency_overrides 完全对齐 `pubspec.ohos.yaml` + - 保留 `msix` dev_dependency 和 `msix_config` 配置(Windows 端 Microsoft Store 打包专用) +- **涉及文件**: `pubspec.yaml` +- **验证**: `git diff --no-index pubspec.ohos.yaml pubspec.yaml` 确认差异仅为 msix 配置和头部注释 + --- ## [v6.118.0] - 2026-06-24 diff --git a/docs/google_play_feature_graphic.html b/docs/google_play_feature_graphic.html new file mode 100644 index 00000000..c5e37736 --- /dev/null +++ b/docs/google_play_feature_graphic.html @@ -0,0 +1,479 @@ + + + + +闲言 Xianyan — Google Play 置顶大图 + + + +
+ +
+
+
+
+ + +
+ 🌐 简体中文 + 繁體中文 + English + 日本語 + +10 种语言 +
+ + +
+ +
+
+
+ 闲言 +
+
+
闲言
+
Xianyan
+
+
+ +
+
灵感语录 · 更纯粹
+
Pure inspiration · Daily quotes & wallpaper creation
+
+ +
+ ✨ 每日拾句 + 🎨 壁纸创作 + 📖 灵感语录 + 🔮 每日运势 +
+
+ + +
+ +
+
📅
+
+
每日拾句
+
Daily Quote
+
+
📖
+
+ + +
+
🎨
+
+
壁纸创作
+
Wallpaper Studio
+
+
🖼️
+
+ + +
+
🔍
+
+
发现工具
+
Discover & Tools
+
+
🧭
+
+ + +
+
🔮
+
+
每日运势
+
Daily Fortune
+
+
+
+
+
+ + + +
+ + diff --git a/docs/google_play_feature_graphic.png b/docs/google_play_feature_graphic.png new file mode 100644 index 00000000..4d915696 Binary files /dev/null and b/docs/google_play_feature_graphic.png differ diff --git a/docs/icon_88x88.png b/docs/icon_88x88.png new file mode 100644 index 00000000..1d115a28 Binary files /dev/null and b/docs/icon_88x88.png differ diff --git a/lib/shared/widgets/display/weather_icon.dart b/lib/shared/widgets/display/weather_icon.dart index 27608b1b..9138070a 100644 --- a/lib/shared/widgets/display/weather_icon.dart +++ b/lib/shared/widgets/display/weather_icon.dart @@ -3,7 +3,7 @@ /// 创建时间: 2026-06-12 /// 更新时间: 2026-06-12 /// 作用: CustomPainter自绘天气图标,支持动态主题色和动画效果 -/// 上次更新: 小尺寸优化 — size<16 自动回退 CupertinoIcons 避免自绘细节丢失 +/// 上次更新: 修复 SingleTickerProviderStateMixin 多 ticker 崩溃 → 改用 TickerProviderStateMixin /// ============================================================ import 'dart:math' as math; @@ -48,22 +48,29 @@ class WeatherIcon extends StatefulWidget { /// 获取天气对应的图标颜色 static Color moodColor(WeatherPoetryMood mood, {bool isDark = false}) => - switch (mood) { - WeatherPoetryMood.sunny => isDark ? const Color(0xFFFFD60A) : const Color(0xFFFFCC00), - WeatherPoetryMood.cloudy => isDark ? const Color(0xFF98989D) : const Color(0xFF8E8E93), - WeatherPoetryMood.rainy => isDark ? const Color(0xFF64D2FF) : const Color(0xFF5AC8FA), - WeatherPoetryMood.thunder => isDark ? const Color(0xFFBF5AF2) : const Color(0xFFAF52DE), - WeatherPoetryMood.snowy => isDark ? const Color(0xFFD1E9FF) : const Color(0xFFC7DFF0), - WeatherPoetryMood.foggy => isDark ? const Color(0xFFC7C7CC) : const Color(0xFFAEAEB2), - WeatherPoetryMood.windy => isDark ? const Color(0xFF64D2FF) : const Color(0xFF5AC8FA), - }; + switch (mood) { + WeatherPoetryMood.sunny => + isDark ? const Color(0xFFFFD60A) : const Color(0xFFFFCC00), + WeatherPoetryMood.cloudy => + isDark ? const Color(0xFF98989D) : const Color(0xFF8E8E93), + WeatherPoetryMood.rainy => + isDark ? const Color(0xFF64D2FF) : const Color(0xFF5AC8FA), + WeatherPoetryMood.thunder => + isDark ? const Color(0xFFBF5AF2) : const Color(0xFFAF52DE), + WeatherPoetryMood.snowy => + isDark ? const Color(0xFFD1E9FF) : const Color(0xFFC7DFF0), + WeatherPoetryMood.foggy => + isDark ? const Color(0xFFC7C7CC) : const Color(0xFFAEAEB2), + WeatherPoetryMood.windy => + isDark ? const Color(0xFF64D2FF) : const Color(0xFF5AC8FA), + }; @override State createState() => _WeatherIconState(); } class _WeatherIconState extends State - with SingleTickerProviderStateMixin { + with TickerProviderStateMixin { AnimationController? _controller; @override @@ -109,7 +116,8 @@ class _WeatherIconState extends State @override Widget build(BuildContext context) { final isDark = AppTheme.isDarkMode(context); - final color = widget.color ?? WeatherIcon.moodColor(widget.mood, isDark: isDark); + final color = + widget.color ?? WeatherIcon.moodColor(widget.mood, isDark: isDark); // 小尺寸优化:16px以下回退到CupertinoIcons,避免自绘细节丢失 if (widget.size < 16) { @@ -127,14 +135,14 @@ class _WeatherIconState extends State /// 小尺寸回退图标 — 将天气类型映射到 CupertinoIcons static IconData _fallbackIcon(WeatherPoetryMood mood) => switch (mood) { - WeatherPoetryMood.sunny => CupertinoIcons.sun_max, - WeatherPoetryMood.cloudy => CupertinoIcons.cloud_fill, - WeatherPoetryMood.rainy => CupertinoIcons.cloud_fill, - WeatherPoetryMood.thunder => CupertinoIcons.bolt_fill, - WeatherPoetryMood.snowy => CupertinoIcons.star_fill, - WeatherPoetryMood.foggy => CupertinoIcons.cloud_fill, - WeatherPoetryMood.windy => CupertinoIcons.wind, - }; + WeatherPoetryMood.sunny => CupertinoIcons.sun_max, + WeatherPoetryMood.cloudy => CupertinoIcons.cloud_fill, + WeatherPoetryMood.rainy => CupertinoIcons.cloud_fill, + WeatherPoetryMood.thunder => CupertinoIcons.bolt_fill, + WeatherPoetryMood.snowy => CupertinoIcons.star_fill, + WeatherPoetryMood.foggy => CupertinoIcons.cloud_fill, + WeatherPoetryMood.windy => CupertinoIcons.wind, + }; Widget _buildPainter(Color color, double progress) => SizedBox( width: widget.size, @@ -143,15 +151,15 @@ class _WeatherIconState extends State ); CustomPainter _createPainter(WeatherPoetryMood mood, Color color, double p) => - switch (mood) { - WeatherPoetryMood.sunny => SunnyPainter(color: color, progress: p), - WeatherPoetryMood.cloudy => CloudyPainter(color: color, progress: p), - WeatherPoetryMood.rainy => RainyPainter(color: color, progress: p), - WeatherPoetryMood.thunder => ThunderPainter(color: color, progress: p), - WeatherPoetryMood.snowy => SnowyPainter(color: color, progress: p), - WeatherPoetryMood.foggy => FoggyPainter(color: color, progress: p), - WeatherPoetryMood.windy => WindyPainter(color: color, progress: p), - }; + switch (mood) { + WeatherPoetryMood.sunny => SunnyPainter(color: color, progress: p), + WeatherPoetryMood.cloudy => CloudyPainter(color: color, progress: p), + WeatherPoetryMood.rainy => RainyPainter(color: color, progress: p), + WeatherPoetryMood.thunder => ThunderPainter(color: color, progress: p), + WeatherPoetryMood.snowy => SnowyPainter(color: color, progress: p), + WeatherPoetryMood.foggy => FoggyPainter(color: color, progress: p), + WeatherPoetryMood.windy => WindyPainter(color: color, progress: p), + }; } // ============================================================ @@ -177,10 +185,38 @@ Path _cloudPath(double left, double top, double w, double h) { final p = Path(); final cx = left + w / 2, cy = top + h / 2; p.moveTo(cx - w / 2, cy); - p.cubicTo(cx - w / 2, cy - h * 0.65, cx - w * 0.25, cy - h * 0.85, cx, cy - h * 0.5); - p.cubicTo(cx + w * 0.25, cy - h * 0.85, cx + w / 2, cy - h * 0.65, cx + w / 2, cy); - p.cubicTo(cx + w / 2, cy + h * 0.35, cx + w * 0.25, cy + h * 0.45, cx, cy + h * 0.35); - p.cubicTo(cx - w * 0.25, cy + h * 0.45, cx - w / 2, cy + h * 0.35, cx - w / 2, cy); + p.cubicTo( + cx - w / 2, + cy - h * 0.65, + cx - w * 0.25, + cy - h * 0.85, + cx, + cy - h * 0.5, + ); + p.cubicTo( + cx + w * 0.25, + cy - h * 0.85, + cx + w / 2, + cy - h * 0.65, + cx + w / 2, + cy, + ); + p.cubicTo( + cx + w / 2, + cy + h * 0.35, + cx + w * 0.25, + cy + h * 0.45, + cx, + cy + h * 0.35, + ); + p.cubicTo( + cx - w * 0.25, + cy + h * 0.45, + cx - w / 2, + cy + h * 0.35, + cx - w / 2, + cy, + ); p.close(); return p; } @@ -222,15 +258,24 @@ class SunnyPainter extends CustomPainter { final dx2 = outerR * math.cos(a), dy2 = outerR * math.sin(a); final ray = Path() ..moveTo(dx1, dy1) - ..cubicTo(dx1 + (dx2 - dx1) * 0.4, dy1 + (dy2 - dy1) * 0.2, - dx1 + (dx2 - dx1) * 0.6, dy1 + (dy2 - dy1) * 0.8, dx2, dy2); + ..cubicTo( + dx1 + (dx2 - dx1) * 0.4, + dy1 + (dy2 - dy1) * 0.2, + dx1 + (dx2 - dx1) * 0.6, + dy1 + (dy2 - dy1) * 0.8, + dx2, + dy2, + ); canvas.drawPath(ray, rayStroke); } canvas.restore(); // 中心高光 - canvas.drawCircle(const Offset(22, 22), 3, - _fillPaint(const Color(0xFFFFFFFF), alpha: 0.4)); + canvas.drawCircle( + const Offset(22, 22), + 3, + _fillPaint(const Color(0xFFFFFFFF), alpha: 0.4), + ); canvas.restore(); } @@ -296,7 +341,10 @@ class RainyPainter extends CustomPainter { final drop = Path() ..moveTo(x, dropY - 4) ..cubicTo(x - 0.5, dropY - 2, x - 0.3, dropY, x, dropY + 2); - canvas.drawPath(drop, _strokePaint(color, 1.8, alpha: alpha.clamp(0.0, 1.0))); + canvas.drawPath( + drop, + _strokePaint(color, 1.8, alpha: alpha.clamp(0.0, 1.0)), + ); } canvas.restore(); @@ -329,17 +377,25 @@ class ThunderPainter extends CustomPainter { final flashAlpha = _flashOpacity(progress); // 闪电锯齿形状 final bolt = Path() - ..moveTo(22, 20)..lineTo(17, 30)..lineTo(21, 30) - ..lineTo(16, 42)..lineTo(27, 27)..lineTo(22, 27) - ..lineTo(27, 20)..close(); + ..moveTo(22, 20) + ..lineTo(17, 30) + ..lineTo(21, 30) + ..lineTo(16, 42) + ..lineTo(27, 27) + ..lineTo(22, 27) + ..lineTo(27, 20) + ..close(); canvas.drawPath(bolt, _fillPaint(color, alpha: flashAlpha)); // 闪电高光 if (flashAlpha > 0.5) { - canvas.drawPath(bolt, Paint() - ..color = color.withValues(alpha: (flashAlpha * 0.3).clamp(0.0, 1.0)) - ..style = PaintingStyle.fill - ..maskFilter = const MaskFilter.blur(BlurStyle.normal, 4)); + canvas.drawPath( + bolt, + Paint() + ..color = color.withValues(alpha: (flashAlpha * 0.3).clamp(0.0, 1.0)) + ..style = PaintingStyle.fill + ..maskFilter = const MaskFilter.blur(BlurStyle.normal, 4), + ); } canvas.restore(); @@ -400,11 +456,18 @@ class SnowyPainter extends CustomPainter { final end = Offset(c.dx + r * math.cos(a), c.dy + r * math.sin(a)); canvas.drawLine(c, end, paint); // 小分支 - final mid = Offset(c.dx + r * 0.6 * math.cos(a), c.dy + r * 0.6 * math.sin(a)); + final mid = Offset( + c.dx + r * 0.6 * math.cos(a), + c.dy + r * 0.6 * math.sin(a), + ); final br = r * 0.3; for (final sign in [1, -1]) { final ba = a + sign * math.pi / 6; - canvas.drawLine(mid, Offset(mid.dx + br * math.cos(ba), mid.dy + br * math.sin(ba)), paint); + canvas.drawLine( + mid, + Offset(mid.dx + br * math.cos(ba), mid.dy + br * math.sin(ba)), + paint, + ); } } } @@ -434,7 +497,11 @@ class FoggyPainter extends CustomPainter { ..strokeCap = StrokeCap.round ..isAntiAlias = true; - const lines = [(16.0, 0.9, 14.0, 34.0), (24.0, 0.7, 10.0, 38.0), (32.0, 0.5, 16.0, 32.0)]; + const lines = [ + (16.0, 0.9, 14.0, 34.0), + (24.0, 0.7, 10.0, 38.0), + (32.0, 0.5, 16.0, 32.0), + ]; for (var i = 0; i < 3; i++) { final (y, alpha, startX, endX) = lines[i]; final dx = math.sin(progress * 2 * math.pi + i * 1.2) * 3.0; @@ -442,8 +509,14 @@ class FoggyPainter extends CustomPainter { stroke.strokeWidth = 2.5 - i * 0.5; final path = Path() ..moveTo(startX + dx, y) - ..cubicTo(startX + (endX - startX) * 0.25 + dx, y - 1.5, - startX + (endX - startX) * 0.75 + dx, y + 1.5, endX + dx, y); + ..cubicTo( + startX + (endX - startX) * 0.25 + dx, + y - 1.5, + startX + (endX - startX) * 0.75 + dx, + y + 1.5, + endX + dx, + y, + ); canvas.drawPath(path, stroke); } @@ -475,7 +548,11 @@ class WindyPainter extends CustomPainter { ..strokeCap = StrokeCap.round ..isAntiAlias = true; - const windLines = [(14.0, 18.0, 2.0, 0.9), (10.0, 26.0, 2.2, 0.7), (16.0, 34.0, 1.8, 0.5)]; + const windLines = [ + (14.0, 18.0, 2.0, 0.9), + (10.0, 26.0, 2.2, 0.7), + (16.0, 34.0, 1.8, 0.5), + ]; for (var i = 0; i < 3; i++) { final (startX, y, sw, alpha) = windLines[i]; final lineLen = 20.0 + i * 4.0; diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index f7c59e2a..aae0199e 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -17,7 +17,7 @@ import flutter_app_group_directory import flutter_image_compress_macos import flutter_inappwebview_macos import flutter_local_notifications -import flutter_secure_storage_darwin +import flutter_secure_storage_macos import flutter_tts import flutter_webrtc import gal @@ -56,7 +56,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin")) InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) - FlutterSecureStorageDarwinPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageDarwinPlugin")) + FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FlutterTtsPlugin.register(with: registry.registrar(forPlugin: "FlutterTtsPlugin")) FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin")) GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))