From 0f4810a6b531a5582f62f2571bcccdd653109869 Mon Sep 17 00:00:00 2001 From: Argus Waikhom Date: Tue, 20 Sep 2022 10:14:17 +0530 Subject: [PATCH] Adding textAlignVertical support on FormBuilderDateRangePicker and FormBuilderDateTimePicker --- lib/src/fields/form_builder_date_range_picker.dart | 3 +++ lib/src/fields/form_builder_date_time_picker.dart | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/src/fields/form_builder_date_range_picker.dart b/lib/src/fields/form_builder_date_range_picker.dart index 344b9ff7bd..1b53482a09 100644 --- a/lib/src/fields/form_builder_date_range_picker.dart +++ b/lib/src/fields/form_builder_date_range_picker.dart @@ -19,6 +19,7 @@ class FormBuilderDateRangePicker extends FormBuilderField { final StrutStyle? strutStyle; final TextDirection? textDirection; final TextAlign textAlign; + final TextAlignVertical? textAlignVertical; final bool autofocus; final bool autocorrect; final MaxLengthEnforcement? maxLengthEnforcement; @@ -86,6 +87,7 @@ class FormBuilderDateRangePicker extends FormBuilderField { this.enableInteractiveSelection = true, this.maxLengthEnforcement, this.textAlign = TextAlign.start, + this.textAlignVertical, this.autofocus = false, this.autocorrect = true, this.cursorWidth = 2.0, @@ -169,6 +171,7 @@ class FormBuilderDateRangePicker extends FormBuilderField { textCapitalization: textCapitalization, textDirection: textDirection, textInputAction: textInputAction, + textAlignVertical: textAlignVertical, strutStyle: strutStyle, readOnly: true, expands: expands, diff --git a/lib/src/fields/form_builder_date_time_picker.dart b/lib/src/fields/form_builder_date_time_picker.dart index 40e9f762fb..09ab3b9914 100644 --- a/lib/src/fields/form_builder_date_time_picker.dart +++ b/lib/src/fields/form_builder_date_time_picker.dart @@ -71,6 +71,7 @@ class FormBuilderDateTimePicker extends FormBuilderField { final TextInputType keyboardType; final TextStyle? style; final TextAlign textAlign; + final TextAlignVertical? textAlignVertical; /// Preset the widget's value. final bool autofocus; @@ -166,6 +167,7 @@ class FormBuilderDateTimePicker extends FormBuilderField { this.locale, this.maxLength, this.textDirection, + this.textAlignVertical, this.onFieldSubmitted, this.controller, this.style, @@ -210,6 +212,7 @@ class FormBuilderDateTimePicker extends FormBuilderField { return TextField( textDirection: textDirection, textAlign: textAlign, + textAlignVertical: textAlignVertical, maxLength: maxLength, autofocus: autofocus, decoration: state.decoration,