feat: 添加消息中心及顶栏未读角标功能

新增消息中心页面,实现未读消息轮询与展示
为各 Tab 页面顶栏添加通知图标及未读数角标
新增通知 API 接口与未读数状态管理
实现消息标记已读、全部已读及下拉刷新功能
This commit is contained in:
andyesfly committed 2026-10-06 13:16:55 +08:00
1 parent 66013ee069
commit 7ad604ff8b
9 files changed
+575 -5

No files matched your search

+6 -1
View File
@@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import '../../../app/tab_index.dart';
import '../../../core/providers.dart';
import '../../../core/theme/app_colors.dart';
import '../../../shared/widgets/app_feedback.dart';
import '../../../shared/widgets/x_card.dart';
@@ -138,7 +139,11 @@ class _MineTabState extends ConsumerState<MineTab> {
];
return XPageShell(
topBar: XTopBar.brand(title: '我的'),
topBar: XTopBar.brand(
title: '我的',
onTrailingTap: () => context.push('/notice'),
trailingBadge: ref.watch(noticeUnreadCountProvider),
),
child: SingleChildScrollView(
padding: const EdgeInsets.fromLTRB(16, 16, 16, 130),
child: Column(