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
741bb9d3
Unverified
Commit
741bb9d3
authored
May 02, 2021
by
Guilherme Henrique
Committed by
GitHub
May 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update text_form_field.dart (#81043)
parent
ec91c658
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
text_form_field.dart
packages/flutter/lib/src/material/text_form_field.dart
+1
-1
text_form_field_test.dart
packages/flutter/test/material/text_form_field_test.dart
+13
-0
No files found.
packages/flutter/lib/src/material/text_form_field.dart
View file @
741bb9d3
...
...
@@ -228,7 +228,7 @@ class TextFormField extends FormField<String> {
'minLines and maxLines must be null when expands is true.'
,
),
assert
(!
obscureText
||
maxLines
==
1
,
'Obscured fields cannot be multiline.'
),
assert
(
maxLength
==
null
||
maxLength
>
0
),
assert
(
maxLength
==
null
||
maxLength
==
TextField
.
noMaxLength
||
maxLength
>
0
),
assert
(
enableInteractiveSelection
!=
null
),
super
(
key:
key
,
...
...
packages/flutter/test/material/text_form_field_test.dart
View file @
741bb9d3
...
...
@@ -114,6 +114,19 @@ void main() {
expect
(
find
.
byType
(
CupertinoButton
),
findsNothing
);
},
variant:
const
TargetPlatformVariant
(<
TargetPlatform
>{
TargetPlatform
.
macOS
,
TargetPlatform
.
windows
,
TargetPlatform
.
linux
}),
skip:
kIsWeb
);
testWidgets
(
'TextFormField accepts TextField.noMaxLength as value to maxLength parameter'
,
(
WidgetTester
tester
)
async
{
bool
asserted
;
try
{
TextFormField
(
maxLength:
TextField
.
noMaxLength
,
);
asserted
=
false
;
}
catch
(
e
){
asserted
=
true
;
}
expect
(
asserted
,
false
);
});
testWidgets
(
'Passes textAlign to underlying TextField'
,
(
WidgetTester
tester
)
async
{
const
TextAlign
alignment
=
TextAlign
.
center
;
...
...
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