- 管理页:单元集 / 计划 / 算法三个维度,卡片带元数据 - 账户页:资料、学习数据、竖直分组的四个功能入口 - 新增设置、文档与帮助(底部可上滑助手)、反馈、关于四个页面 - 抽出 StatBlock 与 GroupedListSection 共用组件 - 关闭 Android 预测式返回,转场改为 M3 水平滑入
83 lines
2.6 KiB
Dart
83 lines
2.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../app_info.dart';
|
|
|
|
/// 关于页。
|
|
class AboutPage extends StatelessWidget {
|
|
const AboutPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final ThemeData theme = Theme.of(context);
|
|
final ColorScheme colors = theme.colorScheme;
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(title: const Text('关于')),
|
|
body: ListView(
|
|
padding: const EdgeInsets.fromLTRB(24, 32, 24, 32),
|
|
children: <Widget>[
|
|
Center(
|
|
child: Container(
|
|
width: 72,
|
|
height: 72,
|
|
decoration: BoxDecoration(
|
|
color: colors.primaryContainer,
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
child: Icon(
|
|
Icons.menu_book_rounded,
|
|
size: 36,
|
|
color: colors.onPrimaryContainer,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
Center(child: Text(appName, style: theme.textTheme.headlineSmall)),
|
|
const SizedBox(height: 4),
|
|
Center(
|
|
child: Text(
|
|
'版本 $appVersion',
|
|
style: theme.textTheme.bodySmall?.copyWith(
|
|
color: colors.onSurfaceVariant,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 28),
|
|
Container(
|
|
padding: const EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
color: colors.surfaceContainerLow,
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: Text(
|
|
'KiriMemo 是 HeurAMS 的移动端前端:用单元集组织材料,'
|
|
'用多种谜题测验同一条知识,调度算法可以按单元集替换。',
|
|
style: theme.textTheme.bodyMedium?.copyWith(height: 1.6),
|
|
),
|
|
),
|
|
const SizedBox(height: 24),
|
|
ListTile(
|
|
contentPadding: EdgeInsets.zero,
|
|
leading: Icon(
|
|
Icons.description_outlined,
|
|
color: colors.onSurfaceVariant,
|
|
),
|
|
title: const Text('开源许可'),
|
|
subtitle: const Text('MIT License'),
|
|
trailing: Icon(
|
|
Icons.chevron_right_rounded,
|
|
color: colors.onSurfaceVariant,
|
|
),
|
|
onTap: () => ScaffoldMessenger.of(context).showSnackBar(
|
|
const SnackBar(
|
|
content: Text('许可文本尚未接入'),
|
|
behavior: SnackBarBehavior.floating,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|