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
13885e7d
Unverified
Commit
13885e7d
authored
Aug 31, 2021
by
creativecreatorormaybenot
Committed by
GitHub
Aug 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix text field naming (#89117)
parent
0d88f605
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
73 deletions
+73
-73
search_field.dart
packages/flutter/lib/src/cupertino/search_field.dart
+2
-2
text_selection.dart
packages/flutter/lib/src/widgets/text_selection.dart
+7
-7
text_field_test.dart
packages/flutter/test/cupertino/text_field_test.dart
+64
-64
No files found.
packages/flutter/lib/src/cupertino/search_field.dart
View file @
13885e7d
...
...
@@ -97,7 +97,7 @@ class CupertinoSearchTextField extends StatefulWidget {
// TODO(DanielEdrisian): Localize the 'Search' placeholder.
///
/// The [style] and [placeholderStyle] properties allow changing the style of
/// the text and placeholder of the textfield. [placeholderStyle] defaults
/// the text and placeholder of the text
field. [placeholderStyle] defaults
/// to the gray [CupertinoColors.secondaryLabel] iOS color.
///
/// To set the text field's background color and border radius, pass a
...
...
@@ -199,7 +199,7 @@ class CupertinoSearchTextField extends StatefulWidget {
/// Defaults to 'Search' localized in each supported language.
final
String
?
placeholder
;
/// Sets the style of the placeholder of the textfield.
/// Sets the style of the placeholder of the text
field.
///
/// Defaults to the gray [CupertinoColors.secondaryLabel] iOS color.
final
TextStyle
?
placeholderStyle
;
...
...
packages/flutter/lib/src/widgets/text_selection.dart
View file @
13885e7d
...
...
@@ -871,27 +871,27 @@ class _TextSelectionHandleOverlayState
/// Delegate interface for the [TextSelectionGestureDetectorBuilder].
///
/// The interface is usually implemented by textfield implementations wrapping
/// The interface is usually implemented by text
field implementations wrapping
/// [EditableText], that use a [TextSelectionGestureDetectorBuilder] to build a
/// [TextSelectionGestureDetector] for their [EditableText]. The delegate provides
/// the builder with information about the current state of the textfield.
/// the builder with information about the current state of the text
field.
/// Based on these information, the builder adds the correct gesture handlers
/// to the gesture detector.
///
/// See also:
///
/// * [TextField], which implements this delegate for the Material textfield.
/// * [TextField], which implements this delegate for the Material text
field.
/// * [CupertinoTextField], which implements this delegate for the Cupertino
/// textfield.
/// text
field.
abstract
class
TextSelectionGestureDetectorBuilderDelegate
{
/// [GlobalKey] to the [EditableText] for which the
/// [TextSelectionGestureDetectorBuilder] will build a [TextSelectionGestureDetector].
GlobalKey
<
EditableTextState
>
get
editableTextKey
;
/// Whether the textfield should respond to force presses.
/// Whether the text
field should respond to force presses.
bool
get
forcePressEnabled
;
/// Whether the user may select text in the textfield.
/// Whether the user may select text in the text
field.
bool
get
selectionEnabled
;
}
...
...
@@ -924,7 +924,7 @@ class TextSelectionGestureDetectorBuilder {
/// The delegate for this [TextSelectionGestureDetectorBuilder].
///
/// The delegate provides the builder with information about what actions can
/// currently be performed on the textfield. Based on this, the builder adds
/// currently be performed on the text
field. Based on this, the builder adds
/// the correct gesture handlers to the gesture detector.
@protected
final
TextSelectionGestureDetectorBuilderDelegate
delegate
;
...
...
packages/flutter/test/cupertino/text_field_test.dart
View file @
13885e7d
...
...
@@ -1628,9 +1628,9 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
();
// We moved the cursor.
...
...
@@ -1660,11 +1660,11 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
500
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
();
// Plain collapsed selection.
...
...
@@ -1753,19 +1753,19 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
500
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
// First tap moved the cursor.
expect
(
controller
.
selection
,
const
TextSelection
.
collapsed
(
offset:
8
,
affinity:
TextAffinity
.
downstream
),
);
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pumpAndSettle
();
// Second tap selects the word around the cursor.
...
...
@@ -1795,12 +1795,12 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
final
TestGesture
gesture
=
await
tester
.
startGesture
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
startGesture
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
// Hold the press.
await
tester
.
pumpAndSettle
();
...
...
@@ -1840,19 +1840,19 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
// First tap moved the cursor.
expect
(
controller
.
selection
,
const
TextSelection
.
collapsed
(
offset:
8
,
affinity:
TextAffinity
.
downstream
),
);
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
500
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
pump
();
// Plain collapsed selection at the edge of first word. In iOS 12, the
...
...
@@ -2075,12 +2075,12 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
final
TestGesture
gesture
=
await
tester
.
startGesture
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
startGesture
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
// Hold the press.
await
tester
.
pump
(
const
Duration
(
milliseconds:
500
));
...
...
@@ -2122,12 +2122,12 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
final
TestGesture
gesture
=
await
tester
.
startGesture
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
startGesture
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
// Hold the press.
await
tester
.
pumpAndSettle
();
...
...
@@ -2168,11 +2168,11 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getCenter
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getCenter
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
await
tester
.
longPressAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
longPressAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
();
// Should only have paste option when whole obscure text is selected.
...
...
@@ -2182,11 +2182,11 @@ void main() {
expect
(
find
.
text
(
'Select All'
),
findsNothing
);
// Tap to cancel selection.
final
Offset
text
f
ieldEnd
=
tester
.
getTopRight
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldEnd
+
const
Offset
(-
10.0
,
5.0
));
final
Offset
text
F
ieldEnd
=
tester
.
getTopRight
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
F
ieldEnd
+
const
Offset
(-
10.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
// Long tap at the end.
await
tester
.
longPressAt
(
text
f
ieldEnd
+
const
Offset
(-
10.0
,
5.0
));
await
tester
.
longPressAt
(
text
F
ieldEnd
+
const
Offset
(-
10.0
,
5.0
));
await
tester
.
pump
();
// Should have paste and select all options when collapse.
...
...
@@ -2212,9 +2212,9 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
longPressAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
longPressAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pumpAndSettle
();
// Collapsed cursor for iOS long press.
...
...
@@ -2244,12 +2244,12 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
longPressAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
longPressAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
();
// We ended up moving the cursor to the edge of the same word and dismissed
...
...
@@ -2280,10 +2280,10 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
TestGesture
gesture
=
await
tester
.
startGesture
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
startGesture
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
500
));
// Long press on iOS shows collapsed selection cursor.
...
...
@@ -2355,10 +2355,10 @@ void main() {
// the right side of the screen.
expect
(
lastCharEndpoint
[
0
].
point
.
dx
,
moreOrLessEquals
(
1094.73
,
epsilon:
0.25
));
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
TestGesture
gesture
=
await
tester
.
startGesture
(
text
f
ieldStart
+
const
Offset
(
300
,
5
));
await
tester
.
startGesture
(
text
F
ieldStart
+
const
Offset
(
300
,
5
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
500
));
expect
(
...
...
@@ -2432,19 +2432,19 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
// First tap moved the cursor to the beginning of the second word.
expect
(
controller
.
selection
,
const
TextSelection
.
collapsed
(
offset:
8
,
affinity:
TextAffinity
.
downstream
),
);
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
500
));
await
tester
.
longPressAt
(
text
f
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
longPressAt
(
text
F
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
pumpAndSettle
();
// Plain collapsed selection at the exact tap position.
...
...
@@ -2474,19 +2474,19 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
longPressAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
longPressAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
// First tap moved the cursor.
expect
(
controller
.
selection
,
const
TextSelection
.
collapsed
(
offset:
8
,
affinity:
TextAffinity
.
downstream
),
);
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pumpAndSettle
();
// Double tap selection.
...
...
@@ -2515,15 +2515,15 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
expect
(
controller
.
selection
,
const
TextSelection
.
collapsed
(
offset:
7
,
affinity:
TextAffinity
.
upstream
),
);
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
5.0
));
await
tester
.
pumpAndSettle
();
expect
(
controller
.
selection
,
...
...
@@ -2532,14 +2532,14 @@ void main() {
expect
(
find
.
byType
(
CupertinoButton
),
isContextMenuProvidedByPlatform
?
findsNothing
:
findsNWidgets
(
3
));
// Double tap selecting the same word somewhere else is fine.
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
// First tap moved the cursor.
expect
(
controller
.
selection
,
const
TextSelection
.
collapsed
(
offset:
7
,
affinity:
TextAffinity
.
upstream
),
);
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
100.0
,
5.0
));
await
tester
.
pumpAndSettle
();
expect
(
controller
.
selection
,
...
...
@@ -2547,14 +2547,14 @@ void main() {
);
expect
(
find
.
byType
(
CupertinoButton
),
isContextMenuProvidedByPlatform
?
findsNothing
:
findsNWidgets
(
3
));
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
50
));
// First tap moved the cursor.
expect
(
controller
.
selection
,
const
TextSelection
.
collapsed
(
offset:
8
,
affinity:
TextAffinity
.
downstream
),
);
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
));
await
tester
.
pumpAndSettle
();
expect
(
controller
.
selection
,
...
...
@@ -2578,15 +2578,15 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
int
pointerValue
=
tester
.
nextPointer
;
final
TestGesture
gesture
=
await
tester
.
createGesture
();
await
gesture
.
downWithCustomEvent
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
),
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
),
PointerDownEvent
(
pointer:
pointerValue
,
position:
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
),
position:
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
),
pressure:
3.0
,
pressureMax:
6.0
,
pressureMin:
0.0
,
...
...
@@ -2618,15 +2618,15 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byType
(
CupertinoTextField
));
final
int
pointerValue
=
tester
.
nextPointer
;
final
TestGesture
gesture
=
await
tester
.
createGesture
();
await
gesture
.
downWithCustomEvent
(
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
),
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
),
PointerDownEvent
(
pointer:
pointerValue
,
position:
text
f
ieldStart
+
const
Offset
(
150.0
,
5.0
),
position:
text
F
ieldStart
+
const
Offset
(
150.0
,
5.0
),
// iPhone 6 and below report 0 across the board.
pressure:
0
,
pressureMax:
0
,
...
...
@@ -4463,12 +4463,12 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byKey
(
const
Key
(
'field0'
)));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byKey
(
const
Key
(
'field0'
)));
await
tester
.
longPressAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
2.0
));
await
tester
.
longPressAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
2.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
150
));
// Tap the Select All button.
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
20.0
,
100.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
20.0
,
100.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
await
expectLater
(
...
...
@@ -4510,12 +4510,12 @@ void main() {
),
);
final
Offset
text
f
ieldStart
=
tester
.
getTopLeft
(
find
.
byKey
(
const
Key
(
'field0'
)));
final
Offset
text
F
ieldStart
=
tester
.
getTopLeft
(
find
.
byKey
(
const
Key
(
'field0'
)));
await
tester
.
longPressAt
(
text
f
ieldStart
+
const
Offset
(
50.0
,
2.0
));
await
tester
.
longPressAt
(
text
F
ieldStart
+
const
Offset
(
50.0
,
2.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
150
));
// Tap the Select All button.
await
tester
.
tapAt
(
text
f
ieldStart
+
const
Offset
(
20.0
,
100.0
));
await
tester
.
tapAt
(
text
F
ieldStart
+
const
Offset
(
20.0
,
100.0
));
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
await
expectLater
(
...
...
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