tapDownInParagraph method
Future<TestGesture>
tapDownInParagraph(
- String nodeId,
- int offset, {
- TextAffinity affinity = TextAffinity.downstream,
- Finder? superEditorFinder,
Implementation
Future<TestGesture> tapDownInParagraph(
String nodeId,
int offset, {
TextAffinity affinity = TextAffinity.downstream,
Finder? superEditorFinder,
}) async {
// Calculate the global tap position based on the TextLayout and desired
// TextPosition.
final globalTapOffset = _findGlobalOffsetForTextPosition(nodeId, offset, affinity, superEditorFinder);
// TODO: check that the tap offset is visible within the viewport. Add option to
// auto-scroll, or throw exception when it's not tappable.
return await startGesture(globalTapOffset);
}