longPressDownInParagraph method

Future<TestGesture> longPressDownInParagraph(
  1. String nodeId,
  2. int offset, {
  3. TextAffinity affinity = TextAffinity.downstream,
  4. Finder? superEditorFinder,
})

Simulates a long-press down at the given text offset within the paragraph with the given nodeId, and returns the TestGesture so that a test can decide to drag it, or release.

Implementation

Future<TestGesture> longPressDownInParagraph(
  String nodeId,
  int offset, {
  TextAffinity affinity = TextAffinity.downstream,
  Finder? superEditorFinder,
}) async {
  final gesture = await tapDownInParagraph(nodeId, offset, affinity: affinity, superEditorFinder: superEditorFinder);
  await pump(kLongPressTimeout + kPressTimeout);
  return gesture;
}