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 {
120
120
// Apply it.
121
121
viewModel.spellingErrorUnderlineStyle = _spellingErrorUnderlineStyle! ;
122
122
}
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 ();
128
124
129
125
if (_overrideSelectionColor && selectionHighlightColor != null ) {
130
126
viewModel.selectionColor = selectionHighlightColor! ;
@@ -136,11 +132,7 @@ class SpellingAndGrammarStyler extends SingleColumnLayoutStylePhase {
136
132
// Apply it.
137
133
viewModel.grammarErrorUnderlineStyle = _grammarErrorUnderlineStyle! ;
138
134
}
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 ();
144
136
145
137
return viewModel;
146
138
}
You can’t perform that action at this time.
0 commit comments