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
a752c2f1
Unverified
Commit
a752c2f1
authored
Feb 01, 2023
by
Callum Moffat
Committed by
GitHub
Feb 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose enableIMEPersonalizedLearning on CupertinoSearchTextField (#119439)
parent
3894d248
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
search_field.dart
packages/flutter/lib/src/cupertino/search_field.dart
+5
-0
search_field_test.dart
packages/flutter/test/cupertino/search_field_test.dart
+15
-0
No files found.
packages/flutter/lib/src/cupertino/search_field.dart
View file @
a752c2f1
...
@@ -122,6 +122,7 @@ class CupertinoSearchTextField extends StatefulWidget {
...
@@ -122,6 +122,7 @@ class CupertinoSearchTextField extends StatefulWidget {
this
.
focusNode
,
this
.
focusNode
,
this
.
smartQuotesType
,
this
.
smartQuotesType
,
this
.
smartDashesType
,
this
.
smartDashesType
,
this
.
enableIMEPersonalizedLearning
=
true
,
this
.
autofocus
=
false
,
this
.
autofocus
=
false
,
this
.
onTap
,
this
.
onTap
,
this
.
autocorrect
=
true
,
this
.
autocorrect
=
true
,
...
@@ -311,6 +312,9 @@ class CupertinoSearchTextField extends StatefulWidget {
...
@@ -311,6 +312,9 @@ class CupertinoSearchTextField extends StatefulWidget {
/// * <https://developer.apple.com/documentation/uikit/uitextinputtraits>
/// * <https://developer.apple.com/documentation/uikit/uitextinputtraits>
final
SmartDashesType
?
smartDashesType
;
final
SmartDashesType
?
smartDashesType
;
/// {@macro flutter.services.TextInputConfiguration.enableIMEPersonalizedLearning}
final
bool
enableIMEPersonalizedLearning
;
/// Disables the text field when false.
/// Disables the text field when false.
///
///
/// Text fields in disabled states have a light grey background and don't
/// Text fields in disabled states have a light grey background and don't
...
@@ -453,6 +457,7 @@ class _CupertinoSearchTextFieldState extends State<CupertinoSearchTextField>
...
@@ -453,6 +457,7 @@ class _CupertinoSearchTextFieldState extends State<CupertinoSearchTextField>
autocorrect:
widget
.
autocorrect
,
autocorrect:
widget
.
autocorrect
,
smartQuotesType:
widget
.
smartQuotesType
,
smartQuotesType:
widget
.
smartQuotesType
,
smartDashesType:
widget
.
smartDashesType
,
smartDashesType:
widget
.
smartDashesType
,
enableIMEPersonalizedLearning:
widget
.
enableIMEPersonalizedLearning
,
textInputAction:
TextInputAction
.
search
,
textInputAction:
TextInputAction
.
search
,
);
);
}
}
...
...
packages/flutter/test/cupertino/search_field_test.dart
View file @
a752c2f1
...
@@ -624,4 +624,19 @@ void main() {
...
@@ -624,4 +624,19 @@ void main() {
final
CupertinoTextField
textField
=
tester
.
widget
(
find
.
byType
(
CupertinoTextField
));
final
CupertinoTextField
textField
=
tester
.
widget
(
find
.
byType
(
CupertinoTextField
));
expect
(
textField
.
smartDashesType
,
SmartDashesType
.
disabled
);
expect
(
textField
.
smartDashesType
,
SmartDashesType
.
disabled
);
});
});
testWidgets
(
'enableIMEPersonalizedLearning is properly forwarded to the inner text field'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
CupertinoApp
(
home:
Center
(
child:
CupertinoSearchTextField
(
enableIMEPersonalizedLearning:
false
,
),
),
),
);
final
CupertinoTextField
textField
=
tester
.
widget
(
find
.
byType
(
CupertinoTextField
));
expect
(
textField
.
enableIMEPersonalizedLearning
,
false
);
});
}
}
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