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
d7285394
Unverified
Commit
d7285394
authored
Jul 15, 2022
by
LongCatIsLooong
Committed by
GitHub
Jul 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove exclamation marks (#107683)
parent
2da22859
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
163 additions
and
119 deletions
+163
-119
input_decorator.dart
packages/flutter/lib/src/material/input_decorator.dart
+114
-118
editable_text.dart
packages/flutter/lib/src/widgets/editable_text.dart
+1
-1
editable_text_test.dart
packages/flutter/test/widgets/editable_text_test.dart
+48
-0
No files found.
packages/flutter/lib/src/material/input_decorator.dart
View file @
d7285394
This diff is collapsed.
Click to expand it.
packages/flutter/lib/src/widgets/editable_text.dart
View file @
d7285394
...
...
@@ -2152,7 +2152,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
@override
void
performPrivateCommand
(
String
action
,
Map
<
String
,
dynamic
>
data
)
{
widget
.
onAppPrivateCommand
!
(
action
,
data
);
widget
.
onAppPrivateCommand
?.
call
(
action
,
data
);
}
// The original position of the caret on FloatingCursorDragState.start.
...
...
packages/flutter/test/widgets/editable_text_test.dart
View file @
d7285394
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:convert'
show
jsonDecode
;
import
'dart:ui'
as
ui
;
import
'package:flutter/cupertino.dart'
;
...
...
@@ -397,6 +398,53 @@ void main() {
);
});
testWidgets
(
'onAppPrivateCommand does not throw'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MediaQuery
(
data:
const
MediaQueryData
(),
child:
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
FocusScope
(
node:
focusScopeNode
,
autofocus:
true
,
child:
EditableText
(
backgroundCursorColor:
Colors
.
grey
,
controller:
controller
,
focusNode:
focusNode
,
style:
textStyle
,
cursorColor:
cursorColor
,
),
),
),
),
);
await
tester
.
tap
(
find
.
byType
(
EditableText
));
await
tester
.
showKeyboard
(
find
.
byType
(
EditableText
));
controller
.
text
=
'test'
;
await
tester
.
idle
();
final
ByteData
?
messageBytes
=
const
JSONMessageCodec
().
encodeMessage
(<
String
,
dynamic
>{
'args'
:
<
dynamic
>[
-
1
,
// The magic clint id that points to the current client.
jsonDecode
(
'{"action": "actionCommand", "data": {"input_context" : "abcdefg"}}'
),
],
'method'
:
'TextInputClient.performPrivateCommand'
,
});
Object
?
error
;
try
{
await
ServicesBinding
.
instance
.
defaultBinaryMessenger
.
handlePlatformMessage
(
'flutter/textinput'
,
messageBytes
,
(
ByteData
?
_
)
{},
);
}
catch
(
e
)
{
error
=
e
;
}
expect
(
error
,
isNull
);
});
group
(
'Infer keyboardType from autofillHints'
,
()
{
testWidgets
(
'infer keyboard types from autofillHints: ios'
,
...
...
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