feat: 设置页面增强,支持用户信息展示和密码修改

This commit is contained in:
qzl
2026-03-10 17:43:17 +08:00
parent 8dd48ec15b
commit f30bfc2006
9 changed files with 859 additions and 135 deletions
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import '../../../../core/theme/design_tokens.dart';
import '../../../../shared/widgets/page_header.dart' as widgets;
import '../../data/services/memory_service.dart';
class MemoryScreen extends StatefulWidget {
const MemoryScreen({super.key});
@@ -11,12 +12,14 @@ class MemoryScreen extends StatefulWidget {
class _MemoryScreenState extends State<MemoryScreen> {
bool _memoryEnabled = true;
final MemoryService _memoryService = MemoryService();
late List<MemoryItemModel> _memoryItems;
final List<MemoryItem> _memoryItems = [
MemoryItem(icon: Icons.language, title: '语言偏好', subtitle: '沟通时偏好使用中文'),
MemoryItem(icon: Icons.schedule, title: '工作时间', subtitle: '工作日 9:00-18:00'),
MemoryItem(icon: Icons.meeting_room, title: '会议习惯', subtitle: '偏好下午安排会议'),
];
@override
void initState() {
super.initState();
_memoryItems = _memoryService.getMemoryItems();
}
@override
Widget build(BuildContext context) {
@@ -33,10 +36,12 @@ class _MemoryScreenState extends State<MemoryScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildToggleCard(),
const SizedBox(height: 14),
_buildListTitle(),
const SizedBox(height: 8),
_buildMemoryList(),
if (_memoryItems.isNotEmpty) ...[
const SizedBox(height: 14),
_buildListTitle(),
const SizedBox(height: 8),
_buildMemoryList(),
],
const SizedBox(height: 20),
_buildManageButton(),
],
@@ -122,7 +127,7 @@ class _MemoryScreenState extends State<MemoryScreen> {
);
}
Widget _buildMemoryItem(MemoryItem item) {
Widget _buildMemoryItem(MemoryItemModel item) {
return GestureDetector(
onTap: () {},
child: Container(
@@ -232,11 +237,3 @@ class _MemoryScreenState extends State<MemoryScreen> {
);
}
}
class MemoryItem {
final IconData icon;
final String title;
final String subtitle;
MemoryItem({required this.icon, required this.title, required this.subtitle});
}