Răsfoiți Sursa

提交键图标从 ↵ 改成 ✓

Co-Authored-By: Claude Code <noreply@anthropic.com>
nonvioce 4 săptămâni în urmă
părinte
comite
707188ce8c
2 a modificat fișierele cu 6 adăugiri și 6 ștergeri
  1. 2 2
      lib/calculator_page.dart
  2. 4 4
      test/widget_test.dart

+ 2 - 2
lib/calculator_page.dart

@@ -551,8 +551,8 @@ class _CalculatorPageState extends State<CalculatorPage> {
             _Key('CLR', _Act.clear, tint: true),
             _Key(',', _Act.comma),
             _Key('ANS', _Act.char, payload: '%', tint: true, display: 'ANS'),
-            // 键盘负责"敲字符",↵ 负责"执行"。两者都叫 = 会撞车。
-            _Key('↵', _Act.commit, primary: true),
+            // 键盘负责"敲字符",✓ 负责"执行"。两者都叫 = 会撞车。
+            _Key('✓', _Act.commit, primary: true),
           ],
         ];
 

+ 4 - 4
test/widget_test.dart

@@ -182,7 +182,7 @@ void main() {
       await pumpApp(tester);
       await press(tester, 'sin');
       await press(tester, 'x');
-      await press(tester, '↵');
+      await press(tester, '✓');
 
       final evals = calls.where((c) => c.method == 'evaluate').toList();
       final committed = evals.where((c) => c.arguments['preview'] == false);
@@ -279,7 +279,7 @@ void main() {
       await pumpApp(tester);
       await press(tester, 'sin');
       await press(tester, 'x');
-      await press(tester, '↵');
+      await press(tester, '✓');
 
       final committed = calls.where(
           (c) => c.method == 'evaluate' && c.arguments['preview'] == false);
@@ -295,7 +295,7 @@ void main() {
       await tester.pumpAndSettle();
       expect(find.text('≈ 近似'), findsOneWidget);
 
-      await press(tester, '↵');
+      await press(tester, '✓');
       final committed = calls.where(
           (c) => c.method == 'evaluate' && c.arguments['preview'] == false);
       expect(committed.last.arguments['expr'], 'N[Sin[x], 15]');
@@ -432,7 +432,7 @@ void main() {
       await press(tester, '2');
       await press(tester, '+');
       await press(tester, '3');
-      await press(tester, '↵');
+      await press(tester, '✓');
 
       // 结果区渲染的是 LaTeX,纯文本那份不在,所以点整个结果条
       await tester.tap(find.byKey(const ValueKey('calc-result')));