@@ -294,6 +294,73 @@ class FormBuilderTextField extends FormBuilderFieldDecoration<String> {
294
294
/// configuration, then [materialMisspelledTextStyle] is used by default.
295
295
final SpellCheckConfiguration ? spellCheckConfiguration;
296
296
297
+ /// {@macro flutter.material.Material.clipBehavior}
298
+ ///
299
+ /// Defaults to [Clip.hardEdge] .
300
+ final Clip clipBehavior;
301
+
302
+ /// Determine whether this text field can request the primary focus.
303
+ ///
304
+ /// Defaults to true. If false, the text field will not request focus
305
+ /// when tapped, or when its context menu is displayed. If false it will not
306
+ /// be possible to move the focus to the text field with tab key.
307
+ final bool canRequestFocus;
308
+
309
+ /// The color of the cursor when the [InputDecorator] is showing an error.
310
+ ///
311
+ /// If this is null it will default to [TextStyle.color] of
312
+ /// [InputDecoration.errorStyle] . If that is null, it will use
313
+ /// [ColorScheme.error] of [ThemeData.colorScheme] .
314
+ final Color ? cursorErrorColor;
315
+
316
+ /// {@macro flutter.widgets.editableText.cursorOpacityAnimates}
317
+ final bool ? cursorOpacityAnimates;
318
+
319
+ /// {@macro flutter.services.TextInputConfiguration.enableIMEPersonalizedLearning}
320
+ final bool enableIMEPersonalizedLearning;
321
+
322
+ /// {@macro flutter.widgets.editableText.groupId}
323
+ final Object groupId;
324
+
325
+ /// {@macro flutter.widgets.editableText.onAppPrivateCommand}
326
+ final AppPrivateCommandCallback ? onAppPrivateCommand;
327
+
328
+ /// Whether [onTap] should be called for every tap.
329
+ ///
330
+ /// Defaults to false, so [onTap] is only called for each distinct tap. When
331
+ /// enabled, [onTap] is called for every tap including consecutive taps.
332
+ final bool onTapAlwaysCalled;
333
+
334
+ /// {@macro flutter.widgets.editableText.scribbleEnabled}
335
+ final bool scribbleEnabled;
336
+
337
+ /// {@macro flutter.widgets.editableText.selectionControls}
338
+ final TextSelectionControls ? selectionControls;
339
+
340
+ /// Represents the interactive "state" of this widget in terms of a set of
341
+ /// [WidgetState] s, including [WidgetState.disabled] , [WidgetState.hovered] ,
342
+ /// [WidgetState.error] , and [WidgetState.focused] .
343
+ ///
344
+ /// Classes based on this one can provide their own
345
+ /// [WidgetStatesController] to which they've added listeners.
346
+ /// They can also update the controller's [WidgetStatesController.value]
347
+ /// however, this may only be done when it's safe to call
348
+ /// [State.setState] , like in an event handler.
349
+ ///
350
+ /// The controller's [WidgetStatesController.value] represents the set of
351
+ /// states that a widget's visual properties, typically [WidgetStateProperty]
352
+ /// values, are resolved against. It is _not_ the intrinsic state of the widget.
353
+ /// The widget is responsible for ensuring that the controller's
354
+ /// [WidgetStatesController.value] tracks its intrinsic state. For example
355
+ /// one cannot request the keyboard focus for a widget by adding [WidgetState.focused]
356
+ /// to its controller. When the widget gains the or loses the focus it will
357
+ /// [WidgetStatesController.update] its controller's [WidgetStatesController.value]
358
+ /// and notify listeners of the change.
359
+ final WidgetStatesController ? statesController;
360
+
361
+ /// {@macro flutter.widgets.undoHistory.controller}
362
+ final UndoHistoryController ? undoController;
363
+
297
364
/// Creates a Material Design text field input.
298
365
FormBuilderTextField ({
299
366
super .key,
@@ -356,6 +423,18 @@ class FormBuilderTextField extends FormBuilderFieldDecoration<String> {
356
423
this .magnifierConfiguration,
357
424
this .contentInsertionConfiguration,
358
425
this .spellCheckConfiguration,
426
+ this .clipBehavior = Clip .hardEdge,
427
+ this .canRequestFocus = true ,
428
+ this .cursorErrorColor,
429
+ this .cursorOpacityAnimates,
430
+ this .enableIMEPersonalizedLearning = true ,
431
+ this .groupId = EditableText ,
432
+ this .onAppPrivateCommand,
433
+ this .onTapAlwaysCalled = false ,
434
+ this .scribbleEnabled = true ,
435
+ this .selectionControls,
436
+ this .statesController,
437
+ this .undoController,
359
438
}) : assert (initialValue == null || controller == null ),
360
439
assert (minLines == null || minLines > 0 ),
361
440
assert (maxLines == null || maxLines > 0 ),
@@ -427,6 +506,18 @@ class FormBuilderTextField extends FormBuilderFieldDecoration<String> {
427
506
magnifierConfiguration: magnifierConfiguration,
428
507
contentInsertionConfiguration: contentInsertionConfiguration,
429
508
spellCheckConfiguration: spellCheckConfiguration,
509
+ clipBehavior: clipBehavior,
510
+ canRequestFocus: canRequestFocus,
511
+ cursorErrorColor: cursorErrorColor,
512
+ cursorOpacityAnimates: cursorOpacityAnimates,
513
+ enableIMEPersonalizedLearning: enableIMEPersonalizedLearning,
514
+ groupId: groupId,
515
+ onAppPrivateCommand: onAppPrivateCommand,
516
+ onTapAlwaysCalled: onTapAlwaysCalled,
517
+ scribbleEnabled: scribbleEnabled,
518
+ selectionControls: selectionControls,
519
+ statesController: statesController,
520
+ undoController: undoController,
430
521
);
431
522
},
432
523
);
0 commit comments