fix(client): NotificationBell.onTap 恢复 required 非空(对齐规范)

- notification_bell.dart: VoidCallback? → VoidCallback(字段非空)
- content_top_bar.dart: 在 null-guard 内用 onBell! 传给 NotificationBell
- flutter analyze: No issues found

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-12 17:57:02 +08:00
parent df19629944
commit 2d37ef1e7b
3 changed files with 51 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ class ContentTopBar extends ConsumerWidget {
),
if (onBell != null) ...[
const SizedBox(width: 12),
NotificationBell(onTap: onBell, hasUnread: true),
NotificationBell(onTap: onBell!, hasUnread: true),
],
if (showThemeToggle) ...[
const SizedBox(width: 12),
+1 -1
View File
@@ -10,7 +10,7 @@ import 'pangolin_icons.dart';
class NotificationBell extends ConsumerWidget {
const NotificationBell({super.key, required this.onTap, this.hasUnread = false});
final VoidCallback? onTap;
final VoidCallback onTap;
final bool hasUnread;
@override