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
318f8758
Unverified
Commit
318f8758
authored
Jan 25, 2023
by
Justin McCandless
Committed by
GitHub
Jan 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass through magnifierConfiguration (#118270)
parent
351466ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-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
+21
-0
No files found.
packages/flutter/lib/src/material/text_form_field.dart
View file @
318f8758
...
...
@@ -154,6 +154,7 @@ class TextFormField extends FormField<String> {
bool
enableIMEPersonalizedLearning
=
true
,
MouseCursor
?
mouseCursor
,
EditableTextContextMenuBuilder
?
contextMenuBuilder
=
_defaultContextMenuBuilder
,
TextMagnifierConfiguration
?
magnifierConfiguration
,
})
:
assert
(
initialValue
==
null
||
controller
==
null
),
assert
(
obscuringCharacter
.
length
==
1
),
assert
(
maxLines
==
null
||
maxLines
>
0
),
...
...
@@ -234,6 +235,7 @@ class TextFormField extends FormField<String> {
enableIMEPersonalizedLearning:
enableIMEPersonalizedLearning
,
mouseCursor:
mouseCursor
,
contextMenuBuilder:
contextMenuBuilder
,
magnifierConfiguration:
magnifierConfiguration
,
),
);
},
...
...
packages/flutter/test/material/text_form_field_test.dart
View file @
318f8758
...
...
@@ -1148,4 +1148,25 @@ void main() {
variant:
TargetPlatformVariant
.
all
(),
skip:
kIsWeb
,
// [intended] we don't supply the cut/copy/paste buttons on the web.
);
testWidgets
(
'magnifierConfiguration passes through to EditableText'
,
(
WidgetTester
tester
)
async
{
final
TextMagnifierConfiguration
myTextMagnifierConfiguration
=
TextMagnifierConfiguration
(
magnifierBuilder:
(
BuildContext
context
,
MagnifierController
controller
,
ValueNotifier
<
MagnifierInfo
>
notifier
)
{
return
const
Placeholder
();
},
);
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Scaffold
(
body:
TextField
(
magnifierConfiguration:
myTextMagnifierConfiguration
,
),
),
));
expect
(
find
.
byType
(
EditableText
),
findsOneWidget
);
final
EditableText
editableText
=
tester
.
widget
(
find
.
byType
(
EditableText
));
expect
(
editableText
.
magnifierConfiguration
,
equals
(
myTextMagnifierConfiguration
));
});
}
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