copyWith method
_SpellCheckConfiguration
copyWith({
- SpellCheckService? spellCheckService,
- Color? misspelledSelectionColor,
- TextStyle? misspelledTextStyle,
- EditableTextContextMenuBuilder? spellCheckSuggestionsToolbarBuilder,
- ExtendedEditableTextContextMenuBuilder? extendedSpellCheckSuggestionsToolbarBuilder,
Returns a copy of the current _SpellCheckConfiguration
instance with
specified overrides.
Implementation
@override
_SpellCheckConfiguration copyWith({
SpellCheckService? spellCheckService,
Color? misspelledSelectionColor,
TextStyle? misspelledTextStyle,
EditableTextContextMenuBuilder? spellCheckSuggestionsToolbarBuilder,
ExtendedEditableTextContextMenuBuilder?
extendedSpellCheckSuggestionsToolbarBuilder,
}) {
if (!_spellCheckEnabled) {
// A new configuration should be constructed to enable spell check.
return const _SpellCheckConfiguration.disabled();
}
return ExtendedSpellCheckConfiguration(
spellCheckService: spellCheckService ?? this.spellCheckService,
misspelledSelectionColor:
misspelledSelectionColor ?? this.misspelledSelectionColor,
misspelledTextStyle: misspelledTextStyle ?? this.misspelledTextStyle,
extendedSpellCheckSuggestionsToolbarBuilder:
extendedSpellCheckSuggestionsToolbarBuilder ??
this.extendedSpellCheckSuggestionsToolbarBuilder,
// spellCheckSuggestionsToolbarBuilder:
// spellCheckSuggestionsToolbarBuilder ??
// this.spellCheckSuggestionsToolbarBuilder,
);
}