// On iOS/iPadOS, during a tap we select the edge of the word closest to the tap.
awaittester.pumpWidget(
CupertinoApp(
home:Center(
child:CupertinoTextField(
controller:controller,
),
),
),
);
finalOffsetvPos=textOffsetToPosition(tester,29);// Index of 'Bonav|enture'.
finalOffsetePos=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.
finalOffsetwPos=textOffsetToPosition(tester,3);// Index of 'Atw|ater'.
// This tap just puts the cursor somewhere different than where the double
// 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.
awaittester.pumpWidget(
MaterialApp(
home:Material(
child:Center(
child:TextField(
controller:controller,
),
),
),
),
);
finalOffsetvPos=textOffsetToPosition(tester,29);// Index of 'Bonav|enture'.
finalOffsetePos=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.
finalOffsetwPos=textOffsetToPosition(tester,3);// Index of 'Atw|ater'.
// This tap just puts the cursor somewhere different than where the double
// tap will occur to test that the double tap moves the existing cursor first.