From bd083976c6e84b2add68c5e8c68d67e65d02da66 Mon Sep 17 00:00:00 2001 From: Developer Date: Mon, 1 Jun 2026 08:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../correction/presentation/correction_page.dart | 1 - .../presentation/pages/chat/chat_settings_page.dart | 1 - .../chat/chat_flow_readlater_message_helper.dart | 4 ++-- .../widgets/session/session_popup_menu.dart | 12 ++++++------ .../presentation/widgets/tool/tool_grid_item.dart | 2 +- lib/features/home/presentation/favorite_page.dart | 2 +- .../home/presentation/providers/offline_page.dart | 2 +- .../presentation/theme/theme_shared_widgets.dart | 2 -- .../services/reading_report_service.dart | 2 +- .../collaboration/canvas/canvas_provider_test.dart | 3 +-- tools/transform_frommap.dart | 2 +- 11 files changed, 14 insertions(+), 19 deletions(-) diff --git a/lib/features/correction/presentation/correction_page.dart b/lib/features/correction/presentation/correction_page.dart index ed4de8bc..0717698c 100644 --- a/lib/features/correction/presentation/correction_page.dart +++ b/lib/features/correction/presentation/correction_page.dart @@ -610,7 +610,6 @@ class _CorrectionPageState extends ConsumerState { final ext = AppTheme.ext(context); final result = await showCupertinoDialog( context: context, - barrierDismissible: false, builder: (dlgCtx) { return CupertinoAlertDialog( title: Row( diff --git a/lib/features/discover/presentation/pages/chat/chat_settings_page.dart b/lib/features/discover/presentation/pages/chat/chat_settings_page.dart index 538933f6..86cf6311 100644 --- a/lib/features/discover/presentation/pages/chat/chat_settings_page.dart +++ b/lib/features/discover/presentation/pages/chat/chat_settings_page.dart @@ -9,7 +9,6 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:image_picker/image_picker.dart'; import 'package:share_plus/share_plus.dart'; diff --git a/lib/features/discover/presentation/widgets/chat/chat_flow_readlater_message_helper.dart b/lib/features/discover/presentation/widgets/chat/chat_flow_readlater_message_helper.dart index 94559950..5ae6b415 100644 --- a/lib/features/discover/presentation/widgets/chat/chat_flow_readlater_message_helper.dart +++ b/lib/features/discover/presentation/widgets/chat/chat_flow_readlater_message_helper.dart @@ -106,7 +106,7 @@ class ChatFlowReadlaterMessageHelper { ), const SizedBox(height: 8), Text( - t.existingTags.replaceAll('{tags}', message.getTags.join(", ")), + t.existingTags.replaceAll('{tags}', message.getTags.join(', ')), style: AppTypography.caption1.copyWith( color: CupertinoColors.secondaryLabel.resolveFrom(context), ), @@ -210,7 +210,7 @@ class ChatFlowReadlaterMessageHelper { context: context, builder: (dCtx) => CupertinoAlertDialog( title: Text(t.smartTagSuggestionTitle), - content: Text(t.aiSuggestedTags.replaceAll('{tags}', tags.join("、"))), + content: Text(t.aiSuggestedTags.replaceAll('{tags}', tags.join('、'))), actions: [ CupertinoDialogAction( isDefaultAction: true, diff --git a/lib/features/discover/presentation/widgets/session/session_popup_menu.dart b/lib/features/discover/presentation/widgets/session/session_popup_menu.dart index aa3af8dd..a324fa28 100644 --- a/lib/features/discover/presentation/widgets/session/session_popup_menu.dart +++ b/lib/features/discover/presentation/widgets/session/session_popup_menu.dart @@ -84,8 +84,8 @@ void showSessionContextMenu({ child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon(CupertinoIcons.pencil, size: 18), - SizedBox(width: 8), + const Icon(CupertinoIcons.pencil, size: 18), + const SizedBox(width: 8), Text(chatFlowT.remark), ], ), @@ -156,8 +156,8 @@ void showSessionContextMenu({ child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon(CupertinoIcons.settings, size: 18), - SizedBox(width: 8), + const Icon(CupertinoIcons.settings, size: 18), + const SizedBox(width: 8), Text(chatFlowT.hideSettings), ], ), @@ -172,8 +172,8 @@ void showSessionContextMenu({ child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon(CupertinoIcons.delete, size: 18), - SizedBox(width: 8), + const Icon(CupertinoIcons.delete, size: 18), + const SizedBox(width: 8), Text(chatFlowT.deleteSession), ], ), diff --git a/lib/features/discover/presentation/widgets/tool/tool_grid_item.dart b/lib/features/discover/presentation/widgets/tool/tool_grid_item.dart index be064e3e..24821f35 100644 --- a/lib/features/discover/presentation/widgets/tool/tool_grid_item.dart +++ b/lib/features/discover/presentation/widgets/tool/tool_grid_item.dart @@ -161,7 +161,7 @@ class _ToolGridItemState extends ConsumerState ), child: Text( ref.watch(translationsProvider).discover.newBadge, - style: TextStyle( + style: const TextStyle( fontSize: 8, color: CupertinoColors.white, fontWeight: FontWeight.w600, diff --git a/lib/features/home/presentation/favorite_page.dart b/lib/features/home/presentation/favorite_page.dart index 497d47bb..5797aa25 100644 --- a/lib/features/home/presentation/favorite_page.dart +++ b/lib/features/home/presentation/favorite_page.dart @@ -293,7 +293,7 @@ class _FavoritePageState extends ConsumerState { return CupertinoPageScaffold( navigationBar: CupertinoNavigationBar( middle: Text( - '${t.favorites.title}', + t.favorites.title, style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.9), diff --git a/lib/features/home/presentation/providers/offline_page.dart b/lib/features/home/presentation/providers/offline_page.dart index a1f2a39e..a6498540 100644 --- a/lib/features/home/presentation/providers/offline_page.dart +++ b/lib/features/home/presentation/providers/offline_page.dart @@ -812,7 +812,7 @@ class _OfflinePageState extends ConsumerState { title: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon( + const Icon( CupertinoIcons.trash, size: 20, color: CupertinoColors.systemRed, diff --git a/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart b/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart index 5ac236d8..5def228b 100644 --- a/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart +++ b/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart @@ -142,8 +142,6 @@ class ScrollableChipList extends StatelessWidget { child: DecoratedBox( decoration: BoxDecoration( gradient: LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, colors: [ ext.bgPrimary.withValues(alpha: 0), ext.bgPrimary.withValues(alpha: 0.6), diff --git a/lib/features/reading_report/services/reading_report_service.dart b/lib/features/reading_report/services/reading_report_service.dart index abd631bb..e3836d47 100644 --- a/lib/features/reading_report/services/reading_report_service.dart +++ b/lib/features/reading_report/services/reading_report_service.dart @@ -186,7 +186,7 @@ class ReadingReportService { ); } catch (e) { Log.e('本地报告生成失败', e); - return ReportResult( + return const ReportResult( report: null, failedSources: {'本地数据'}, isAuthError: true, diff --git a/test/features/file_transfer/collaboration/canvas/canvas_provider_test.dart b/test/features/file_transfer/collaboration/canvas/canvas_provider_test.dart index b01077cd..cc8a9a6e 100644 --- a/test/features/file_transfer/collaboration/canvas/canvas_provider_test.dart +++ b/test/features/file_transfer/collaboration/canvas/canvas_provider_test.dart @@ -8,7 +8,6 @@ // ============================================================ import 'dart:async'; -import 'dart:ui'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -628,7 +627,7 @@ void main() { test('clearCanvasId为false时保留原值', () { const state = CanvasState(canvasId: 'test-id'); - final updated = state.copyWith(clearCanvasId: false); + final updated = state.copyWith(); expect(updated.canvasId, 'test-id'); }); diff --git a/tools/transform_frommap.dart b/tools/transform_frommap.dart index 1218a145..65780459 100644 --- a/tools/transform_frommap.dart +++ b/tools/transform_frommap.dart @@ -10,7 +10,7 @@ void main() { 't_settings_data_collection.dart': 'TSettingsDataCollection', }; - final baseDir = 'e:\\project\\flutter\\f\\xianyan\\lib\\l10n\\types'; + const baseDir = 'e:\\project\\flutter\\f\\xianyan\\lib\\l10n\\types'; for (final entry in files.entries) { final file = File('$baseDir\\${entry.key}');