Skip to content

Commit

Permalink
Merge pull request #1116 from arguswaikhom/main
Browse files Browse the repository at this point in the history
Adding textAlignVertical support on FormBuilderDateRangePicker and FormBuilderDateTimePicker
  • Loading branch information
deandreamatias authored Sep 20, 2022
2 parents 9348c10 + 0f4810a commit e8302de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/fields/form_builder_date_range_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class FormBuilderDateRangePicker extends FormBuilderField<DateTimeRange> {
final StrutStyle? strutStyle;
final TextDirection? textDirection;
final TextAlign textAlign;
final TextAlignVertical? textAlignVertical;
final bool autofocus;
final bool autocorrect;
final MaxLengthEnforcement? maxLengthEnforcement;
Expand Down Expand Up @@ -86,6 +87,7 @@ class FormBuilderDateRangePicker extends FormBuilderField<DateTimeRange> {
this.enableInteractiveSelection = true,
this.maxLengthEnforcement,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.autofocus = false,
this.autocorrect = true,
this.cursorWidth = 2.0,
Expand Down Expand Up @@ -169,6 +171,7 @@ class FormBuilderDateRangePicker extends FormBuilderField<DateTimeRange> {
textCapitalization: textCapitalization,
textDirection: textDirection,
textInputAction: textInputAction,
textAlignVertical: textAlignVertical,
strutStyle: strutStyle,
readOnly: true,
expands: expands,
Expand Down
3 changes: 3 additions & 0 deletions lib/src/fields/form_builder_date_time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class FormBuilderDateTimePicker extends FormBuilderField<DateTime> {
final TextInputType keyboardType;
final TextStyle? style;
final TextAlign textAlign;
final TextAlignVertical? textAlignVertical;

/// Preset the widget's value.
final bool autofocus;
Expand Down Expand Up @@ -166,6 +167,7 @@ class FormBuilderDateTimePicker extends FormBuilderField<DateTime> {
this.locale,
this.maxLength,
this.textDirection,
this.textAlignVertical,
this.onFieldSubmitted,
this.controller,
this.style,
Expand Down Expand Up @@ -210,6 +212,7 @@ class FormBuilderDateTimePicker extends FormBuilderField<DateTime> {
return TextField(
textDirection: textDirection,
textAlign: textAlign,
textAlignVertical: textAlignVertical,
maxLength: maxLength,
autofocus: autofocus,
decoration: state.decoration,
Expand Down

0 comments on commit e8302de

Please sign in to comment.