Fix spell_check_test (#110814)
diff --git a/dev/integration_tests/non_nullable/android/app/src/main/res/drawable/launch_background.xml b/dev/integration_tests/non_nullable/android/app/src/main/res/drawable/launch_background.xml
index 32d7798..3727f9e 100644
--- a/dev/integration_tests/non_nullable/android/app/src/main/res/drawable/launch_background.xml
+++ b/dev/integration_tests/non_nullable/android/app/src/main/res/drawable/launch_background.xml
@@ -1,8 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
-<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
diff --git a/dev/integration_tests/spell_check/android/app/src/main/res/values/styles.xml b/dev/integration_tests/spell_check/android/app/src/main/res/values/styles.xml
index c5ad344..55fd7b5 100644
--- a/dev/integration_tests/spell_check/android/app/src/main/res/values/styles.xml
+++ b/dev/integration_tests/spell_check/android/app/src/main/res/values/styles.xml
@@ -1,8 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
-<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
diff --git a/dev/integration_tests/spell_check/integration_test/integration_test.dart b/dev/integration_tests/spell_check/integration_test/integration_test.dart
index 2e57c2a..088416c 100644
--- a/dev/integration_tests/spell_check/integration_test/integration_test.dart
+++ b/dev/integration_tests/spell_check/integration_test/integration_test.dart
@@ -147,7 +147,7 @@
await tester.pumpWidget(const MyApp());
- await tester.enterText(find.byType(EditableText), 'Hey wrororld! Hey!');
+ await tester.enterText(find.byType(EditableText), 'Hey cfabiueqqocnakoef! Hey!');
await tester.pumpAndSettle();
final RenderEditable renderEditable = findRenderEditable(tester, EditableText);
@@ -157,7 +157,7 @@
style: style,
children: <TextSpan>[
TextSpan(style: style, text: 'Hey '),
- TextSpan(style: misspelledTextStyle, text: 'wrororld'),
+ TextSpan(style: misspelledTextStyle, text: 'cfabiueqqocnakoef'),
TextSpan(style: style, text: '! Hey!'),
]);
diff --git a/packages/flutter/lib/src/services/spell_check.dart b/packages/flutter/lib/src/services/spell_check.dart
index c8ff5d0..86113db 100644
--- a/packages/flutter/lib/src/services/spell_check.dart
+++ b/packages/flutter/lib/src/services/spell_check.dart
@@ -211,9 +211,8 @@
if (textHasNotChanged && spansHaveChanged) {
suggestionSpans = mergeResults(lastSavedResults!.suggestionSpans, suggestionSpans);
}
-
- lastSavedResults = SpellCheckResults(text, suggestionSpans);
}
+ lastSavedResults = SpellCheckResults(text, suggestionSpans);
return suggestionSpans;
}
diff --git a/packages/integration_test/example/android/app/src/main/res/drawable/launch_background.xml b/packages/integration_test/example/android/app/src/main/res/drawable/launch_background.xml
index 32d7798..3727f9e 100644
--- a/packages/integration_test/example/android/app/src/main/res/drawable/launch_background.xml
+++ b/packages/integration_test/example/android/app/src/main/res/drawable/launch_background.xml
@@ -1,8 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
-<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />