feat(mobile): UI-01 theme system, shared components and navigation

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-21 14:55:29 +08:00
parent 8f4ad11bd5
commit c94b9e5e58
27 changed files with 2067 additions and 555 deletions
@@ -0,0 +1,37 @@
/// 分组标题(UI-01 §3.1:分组标题 17-18):标题 + 可选行尾动作。
///
/// 标题取主题 titleMedium(w600);行尾动作由调用方构建(如「查看全部」
/// TextButton)。不自带内外边距——由页面布局决定(避免为每个 SizedBox
/// 建一层封装)。
library;
import 'package:flutter/material.dart';
/// 分组标题行。
class SectionHeader extends StatelessWidget {
const SectionHeader({required this.title, this.trailing, super.key});
/// 分组标题(本地化文案)。
final String title;
/// 行尾动作(可选)。
final Widget? trailing;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Row(
children: [
Expanded(
child: Text(
title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium,
),
),
if (trailing != null) ...[const SizedBox(width: 8), trailing!],
],
);
}
}