From 8b21957f91f305df028baca3d673d32c2bde07d1 Mon Sep 17 00:00:00 2001 From: KSokhal Date: Fri, 20 Oct 2023 09:46:26 +0100 Subject: [PATCH] Exposed spell check configuration from text field --- lib/src/fields/form_builder_text_field.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/src/fields/form_builder_text_field.dart b/lib/src/fields/form_builder_text_field.dart index e4d32d5ac..caa2be970 100644 --- a/lib/src/fields/form_builder_text_field.dart +++ b/lib/src/fields/form_builder_text_field.dart @@ -288,6 +288,12 @@ class FormBuilderTextField extends FormBuilderFieldDecoration { /// {@macro flutter.widgets.editableText.contentInsertionConfiguration} final ContentInsertionConfiguration? contentInsertionConfiguration; + /// {@macro flutter.widgets.EditableText.spellCheckConfiguration} + /// + /// If [SpellCheckConfiguration.misspelledTextStyle] is not specified in this + /// configuration, then [materialMisspelledTextStyle] is used by default. + final SpellCheckConfiguration? spellCheckConfiguration; + /// Creates a Material Design text field input. FormBuilderTextField({ super.key, @@ -349,6 +355,7 @@ class FormBuilderTextField extends FormBuilderFieldDecoration { this.contextMenuBuilder = _defaultContextMenuBuilder, this.magnifierConfiguration, this.contentInsertionConfiguration, + this.spellCheckConfiguration, }) : assert(initialValue == null || controller == null), assert(minLines == null || minLines > 0), assert(maxLines == null || maxLines > 0), @@ -419,6 +426,7 @@ class FormBuilderTextField extends FormBuilderFieldDecoration { autofillHints: autofillHints, magnifierConfiguration: magnifierConfiguration, contentInsertionConfiguration: contentInsertionConfiguration, + spellCheckConfiguration: spellCheckConfiguration, ); }, );