longPress method

Future<void> longPress(
  1. FlutterDriver driver,
  2. SerializableFinder finder,
  3. {Duration pressDuration = const Duration(milliseconds: 500),
  4. Duration timeout = const Duration(seconds: 30)}
)

Implementation

static Future<void> longPress(
  FlutterDriver driver,
  SerializableFinder finder, {
  Duration pressDuration = const Duration(milliseconds: 500),
  Duration timeout = const Duration(seconds: 30),
}) async {
  await driver.scroll(finder, 0, 0, pressDuration, timeout: timeout);
  await FlutterDriverUtils.waitForFlutter(driver, timeout: timeout);
}