Fix spell_check_test (#110814)

This commit is contained in:
Camille Simon 2022-09-08 14:24:12 -07:00 committed by GitHub
parent 652ff7a5e6
commit 70f6bed9ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 7 deletions

View File

@ -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" />

View File

@ -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">

View File

@ -147,7 +147,7 @@ Future<void> main() async {
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 @@ Future<void> main() async {
style: style,
children: <TextSpan>[
TextSpan(style: style, text: 'Hey '),
TextSpan(style: misspelledTextStyle, text: 'wrororld'),
TextSpan(style: misspelledTextStyle, text: 'cfabiueqqocnakoef'),
TextSpan(style: style, text: '! Hey!'),
]);

View File

@ -211,9 +211,8 @@ class DefaultSpellCheckService implements SpellCheckService {
if (textHasNotChanged && spansHaveChanged) {
suggestionSpans = mergeResults(lastSavedResults!.suggestionSpans, suggestionSpans);
}
lastSavedResults = SpellCheckResults(text, suggestionSpans);
}
lastSavedResults = SpellCheckResults(text, suggestionSpans);
return suggestionSpans;
}

View File

@ -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" />