Skip to content

Commit 437f2c7

Browse files
feat: add stylusHandwritingEnabled property and deprecate scribbleEnabled
1 parent f6475ca commit 437f2c7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/src/fields/form_builder_text_field.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ class FormBuilderTextField extends FormBuilderFieldDecoration<String> {
331331
/// enabled, [onTap] is called for every tap including consecutive taps.
332332
final bool onTapAlwaysCalled;
333333

334+
/// {@macro flutter.widgets.editableText.stylusHandwritingEnabled}
335+
final bool stylusHandwritingEnabled;
336+
334337
/// {@macro flutter.widgets.editableText.scribbleEnabled}
335338
final bool scribbleEnabled;
336339

@@ -436,7 +439,13 @@ class FormBuilderTextField extends FormBuilderFieldDecoration<String> {
436439
this.groupId = EditableText,
437440
this.onAppPrivateCommand,
438441
this.onTapAlwaysCalled = false,
442+
@Deprecated(
443+
'Use `stylusHandwritingEnabled` instead. '
444+
'This feature was deprecated after v3.27.0-0.2.pre.',
445+
)
439446
this.scribbleEnabled = true,
447+
this.stylusHandwritingEnabled =
448+
EditableText.defaultStylusHandwritingEnabled,
440449
this.selectionControls,
441450
this.statesController,
442451
this.undoController,
@@ -519,7 +528,7 @@ class FormBuilderTextField extends FormBuilderFieldDecoration<String> {
519528
groupId: groupId,
520529
onAppPrivateCommand: onAppPrivateCommand,
521530
onTapAlwaysCalled: onTapAlwaysCalled,
522-
scribbleEnabled: scribbleEnabled,
531+
stylusHandwritingEnabled: stylusHandwritingEnabled,
523532
selectionControls: selectionControls,
524533
statesController: statesController,
525534
undoController: undoController,

0 commit comments

Comments
 (0)