File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
super_editor/lib/src/default_editor/spelling_and_grammar Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,7 @@ class SpellingAndGrammarStyler extends SingleColumnLayoutStylePhase {
120120 // Apply it.
121121 viewModel.spellingErrorUnderlineStyle = _spellingErrorUnderlineStyle! ;
122122 }
123- viewModel.spellingErrors
124- ..clear ()
125- ..addAll ([
126- for (final spellingError in spellingErrors) spellingError.range,
127- ]);
123+ viewModel.spellingErrors = spellingErrors.map ((error) => error.range).toList ();
128124
129125 if (_overrideSelectionColor && selectionHighlightColor != null ) {
130126 viewModel.selectionColor = selectionHighlightColor! ;
@@ -136,11 +132,7 @@ class SpellingAndGrammarStyler extends SingleColumnLayoutStylePhase {
136132 // Apply it.
137133 viewModel.grammarErrorUnderlineStyle = _grammarErrorUnderlineStyle! ;
138134 }
139- viewModel.grammarErrors
140- ..clear ()
141- ..addAll ([
142- for (final grammarError in grammarErrors) grammarError.range,
143- ]);
135+ viewModel.grammarErrors = grammarErrors.map ((error) => error.range).toList ();
144136
145137 return viewModel;
146138 }
You can’t perform that action at this time.
0 commit comments