inferIOSSpellCheckConfiguration static method
- SpellCheckConfiguration? configuration
Returns a new SpellCheckConfiguration where the given configuration has had any missing values replaced with their defaults for the iOS platform.
Implementation
static SpellCheckConfiguration inferIOSSpellCheckConfiguration(
SpellCheckConfiguration? configuration,
) {
if (configuration == null || configuration == const SpellCheckConfiguration.disabled()) {
return const SpellCheckConfiguration.disabled();
}
return configuration.copyWith(
misspelledTextStyle:
configuration.misspelledTextStyle ?? CupertinoTextField.cupertinoMisspelledTextStyle,
misspelledSelectionColor:
configuration.misspelledSelectionColor ?? CupertinoTextField.kMisspelledSelectionColor,
spellCheckSuggestionsToolbarBuilder:
configuration.spellCheckSuggestionsToolbarBuilder ??
CupertinoTextField.defaultSpellCheckSuggestionsToolbarBuilder,
);
}