138 lines
3.6 KiB
Dart
138 lines
3.6 KiB
Dart
/// ============================================================
|
|
/// 闲言APP — 关于页面共享组件
|
|
/// 创建时间: 2026-05-29
|
|
/// 更新时间: 2026-06-05
|
|
/// 作用: 软件信息页与了解我们页共用的通用组件及更新日志数据
|
|
/// 上次更新: 新增 AppUpdateLog 共享更新日志数据,确保两处展示一致
|
|
/// ============================================================
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart' show Divider;
|
|
|
|
import '../../../core/theme/app_theme.dart';
|
|
import '../../../core/theme/app_spacing.dart';
|
|
import '../../../core/theme/app_typography.dart';
|
|
import '../../../core/theme/app_radius.dart';
|
|
|
|
// ============================================================
|
|
// 更新日志数据 — 软件信息页 & 关于页共用
|
|
// ============================================================
|
|
|
|
/// 单条更新日志
|
|
class UpdateLogEntry {
|
|
const UpdateLogEntry({
|
|
required this.version,
|
|
required this.date,
|
|
required this.changes,
|
|
});
|
|
|
|
/// 版本号
|
|
final String version;
|
|
|
|
/// 发布日期
|
|
final String date;
|
|
|
|
/// 更新内容列表(中文)
|
|
final List<String> changes;
|
|
}
|
|
|
|
/// 全局更新日志数据(中文)
|
|
class AppUpdateLog {
|
|
AppUpdateLog._();
|
|
|
|
static const List<UpdateLogEntry> entries = [
|
|
UpdateLogEntry(
|
|
version: 'v6.6.14',
|
|
date: '2026-06-05',
|
|
changes: [
|
|
'🆕 提升原生侧 ←-→ dart 通信能力',
|
|
'框架优化"',
|
|
|
|
'v6.6版本以后使用更严格的内存管理机制,拒绝线程空跑,减少内存占用',
|
|
],
|
|
),
|
|
UpdateLogEntry(
|
|
version: 'v6.5.1',
|
|
date: '2026-05-29',
|
|
changes: ['🔧 修复返回主页面渲染异常', '🎨 统一按钮选中色动态主题'],
|
|
),
|
|
UpdateLogEntry(
|
|
version: 'v6.5.0',
|
|
date: '2026-05-20',
|
|
changes: [
|
|
'🆕 增加收集信息入口',
|
|
'🔧 增强句子列表交错动画',
|
|
'🔧 修复软件权限页面跳转',
|
|
'多语言键值追加',
|
|
],
|
|
),
|
|
];
|
|
}
|
|
|
|
class AboutSectionTitle extends StatelessWidget {
|
|
const AboutSectionTitle({
|
|
super.key,
|
|
required this.icon,
|
|
required this.title,
|
|
required this.ext,
|
|
this.trailing,
|
|
});
|
|
|
|
final IconData icon;
|
|
final String title;
|
|
final AppThemeExtension ext;
|
|
final Widget? trailing;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.all(AppSpacing.md),
|
|
child: Row(
|
|
children: [
|
|
Container(
|
|
padding: const EdgeInsets.all(AppSpacing.sm),
|
|
decoration: BoxDecoration(
|
|
color: ext.accent.withValues(alpha: 0.12),
|
|
borderRadius: AppRadius.smBorder,
|
|
),
|
|
child: Icon(icon, color: ext.accent, size: 18),
|
|
),
|
|
const SizedBox(width: AppSpacing.sm),
|
|
Text(
|
|
title,
|
|
style: AppTypography.headline.copyWith(
|
|
fontWeight: FontWeight.bold,
|
|
color: ext.textPrimary,
|
|
),
|
|
),
|
|
if (trailing != null) ...[
|
|
const SizedBox(width: AppSpacing.xs),
|
|
trailing!,
|
|
],
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class AboutDivider extends StatelessWidget {
|
|
const AboutDivider({super.key, required this.ext, this.leftIndent = 18});
|
|
|
|
final AppThemeExtension ext;
|
|
final double leftIndent;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: EdgeInsets.only(
|
|
left: AppSpacing.md + leftIndent + AppSpacing.md,
|
|
),
|
|
child: Divider(
|
|
height: 1,
|
|
thickness: 0.5,
|
|
color: ext.textHint.withValues(alpha: 0.1),
|
|
),
|
|
);
|
|
}
|
|
}
|