longPressWidget method

Future<void> longPressWidget(
  1. String id, {
  2. TestStep? step,
  3. Future<void> onBeforeLongPress()?,
})

Implementation

Future<void> longPressWidget(
  String id, {
  TestStep? step,
  Future<void> Function()? onBeforeLongPress,
}) async {
  final finder = assertions.finderForId(id);
  _expectSingleWidget(finder, id, 'longPress');
  await _emitEvidenceBoundary(step);
  await onBeforeLongPress?.call();
  await tester.longPress(finder);
  await runtime.settleAfterAction();
}