Unverified Commit d3b70c91 authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

Add the textAlignVertical param to TextFormField (#39144)

parent 80f96ee6
...@@ -87,6 +87,7 @@ class TextFormField extends FormField<String> { ...@@ -87,6 +87,7 @@ class TextFormField extends FormField<String> {
StrutStyle strutStyle, StrutStyle strutStyle,
TextDirection textDirection, TextDirection textDirection,
TextAlign textAlign = TextAlign.start, TextAlign textAlign = TextAlign.start,
TextAlignVertical textAlignVertical,
bool autofocus = false, bool autofocus = false,
bool readOnly = false, bool readOnly = false,
ToolbarOptions toolbarOptions, ToolbarOptions toolbarOptions,
...@@ -162,6 +163,7 @@ class TextFormField extends FormField<String> { ...@@ -162,6 +163,7 @@ class TextFormField extends FormField<String> {
style: style, style: style,
strutStyle: strutStyle, strutStyle: strutStyle,
textAlign: textAlign, textAlign: textAlign,
textAlignVertical: textAlignVertical,
textDirection: textDirection, textDirection: textDirection,
textCapitalization: textCapitalization, textCapitalization: textCapitalization,
autofocus: autofocus, autofocus: autofocus,
......
...@@ -32,6 +32,28 @@ void main() { ...@@ -32,6 +32,28 @@ void main() {
expect(textFieldWidget.textAlign, alignment); expect(textFieldWidget.textAlign, alignment);
}); });
testWidgets('Passes textAlignVertical to underlying TextField', (WidgetTester tester) async {
const TextAlignVertical textAlignVertical = TextAlignVertical.bottom;
await tester.pumpWidget(
MaterialApp(
home: Material(
child: Center(
child: TextFormField(
textAlignVertical: textAlignVertical,
),
),
),
),
);
final Finder textFieldFinder = find.byType(TextField);
expect(textFieldFinder, findsOneWidget);
final TextField textFieldWidget = tester.widget(textFieldFinder);
expect(textFieldWidget.textAlignVertical, textAlignVertical);
});
testWidgets('Passes textInputAction to underlying TextField', (WidgetTester tester) async { testWidgets('Passes textInputAction to underlying TextField', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment