tapDownInParagraph method

Future<TestGesture> tapDownInParagraph(
  1. String nodeId,
  2. int offset, {
  3. TextAffinity affinity = TextAffinity.downstream,
  4. 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);
}