Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d3b70c91
Unverified
Commit
d3b70c91
authored
Aug 28, 2019
by
Justin McCandless
Committed by
GitHub
Aug 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the textAlignVertical param to TextFormField (#39144)
parent
80f96ee6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
text_form_field.dart
packages/flutter/lib/src/material/text_form_field.dart
+2
-0
text_form_field_test.dart
packages/flutter/test/material/text_form_field_test.dart
+22
-0
No files found.
packages/flutter/lib/src/material/text_form_field.dart
View file @
d3b70c91
...
...
@@ -87,6 +87,7 @@ class TextFormField extends FormField<String> {
StrutStyle
strutStyle
,
TextDirection
textDirection
,
TextAlign
textAlign
=
TextAlign
.
start
,
TextAlignVertical
textAlignVertical
,
bool
autofocus
=
false
,
bool
readOnly
=
false
,
ToolbarOptions
toolbarOptions
,
...
...
@@ -162,6 +163,7 @@ class TextFormField extends FormField<String> {
style:
style
,
strutStyle:
strutStyle
,
textAlign:
textAlign
,
textAlignVertical:
textAlignVertical
,
textDirection:
textDirection
,
textCapitalization:
textCapitalization
,
autofocus:
autofocus
,
...
...
packages/flutter/test/material/text_form_field_test.dart
View file @
d3b70c91
...
...
@@ -32,6 +32,28 @@ void main() {
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
{
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment