You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// On iOS/iPadOS, during a tap we select the edge of the word closest to the tap.
1766
+
await tester.pumpWidget(
1767
+
CupertinoApp(
1768
+
home:Center(
1769
+
child:CupertinoTextField(
1770
+
controller: controller,
1771
+
),
1772
+
),
1773
+
),
1774
+
);
1775
+
1776
+
finalOffset vPos =textOffsetToPosition(tester, 29); // Index of 'Bonav|enture'.
1777
+
finalOffset ePos =textOffsetToPosition(tester, 35) +constOffset(7.0, 0.0); // Index of 'Bonaventure|' + Offset(7.0,0), which taps slightly to the right of the end of the text.
1778
+
finalOffset wPos =textOffsetToPosition(tester, 3); // Index of 'Atw|ater'.
1779
+
1780
+
// This tap just puts the cursor somewhere different than where the double
1781
+
// tap will occur to test that the double tap moves the existing cursor first.
// On iOS/iPadOS, during a tap we select the edge of the word closest to the tap.
7426
+
await tester.pumpWidget(
7427
+
MaterialApp(
7428
+
home:Material(
7429
+
child:Center(
7430
+
child:TextField(
7431
+
controller: controller,
7432
+
),
7433
+
),
7434
+
),
7435
+
),
7436
+
);
7437
+
7438
+
finalOffset vPos =textOffsetToPosition(tester, 29); // Index of 'Bonav|enture'.
7439
+
finalOffset ePos =textOffsetToPosition(tester, 35) +constOffset(7.0, 0.0); // Index of 'Bonaventure|' + Offset(7.0,0), which taps slightly to the right of the end of the text.
7440
+
finalOffset wPos =textOffsetToPosition(tester, 3); // Index of 'Atw|ater'.
7441
+
7442
+
// This tap just puts the cursor somewhere different than where the double
7443
+
// tap will occur to test that the double tap moves the existing cursor first.
0 commit comments