chore: 更新主题、反馈页面和测试用例

- 更新 App 主题配置
- 优化反馈页面
- 更新认证和通知测试用例
This commit is contained in:
ZL-Q
2026-04-28 17:23:03 +08:00
parent 85023a668b
commit dd48d1d59d
4 changed files with 20 additions and 9 deletions
+2
View File
@@ -69,6 +69,8 @@ class AppTheme {
warning: Color(0xFFF57C00),
warningContainer: Color(0xFFFFF3E0),
onWarningContainer: Color(0xFF8A4B00),
incomeGreenBg: Color(0xFFE8F5E9),
incomeGreenText: Color(0xFF2E7D32),
),
],
);
@@ -50,15 +50,17 @@ class _FeedbackScreenState extends State<FeedbackScreen> {
final colors = Theme.of(context).colorScheme;
final l10n = AppLocalizations.of(context)!;
return Scaffold(
backgroundColor: colors.surfaceContainerLow,
appBar: AppBar(
title: Text(l10n.feedbackTitle),
centerTitle: true,
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Scaffold(
backgroundColor: colors.surfaceContainerLow,
surfaceTintColor: colors.surfaceContainerLow,
),
body: ListView(
appBar: AppBar(
title: Text(l10n.feedbackTitle),
centerTitle: true,
backgroundColor: colors.surfaceContainerLow,
surfaceTintColor: colors.surfaceContainerLow,
),
body: ListView(
padding: const EdgeInsets.fromLTRB(
AppSpacing.lg,
AppSpacing.md,
@@ -154,6 +156,7 @@ class _FeedbackScreenState extends State<FeedbackScreen> {
),
),
],
),
),
);
}
@@ -21,6 +21,8 @@ class _FakeAuthRepository implements AuthRepository {
Future<AuthUser> loginWithEmailOtp({
required String email,
required String otp,
String? language,
String? timezone,
}) async {
return AuthUser(id: 'u1', email: email);
}
@@ -17,6 +17,7 @@ class _FakeNotificationRepository implements NotificationRepository {
Future<NotificationListResult> listNotifications({
int limit = 20,
String? cursor,
String locale = 'zh',
}) async {
return NotificationListResult(
items: items,
@@ -29,7 +30,10 @@ class _FakeNotificationRepository implements NotificationRepository {
Future<int> getUnreadCount() async => unreadCount;
@override
Future<NotificationItem> markRead({required String notificationId}) async {
Future<NotificationItem> markRead({
required String notificationId,
String locale = 'zh',
}) async {
if (failMarkRead) {
throw Exception('Mark read failed');
}