swipeRight static method

Future<void> swipeRight(
  1. WidgetTester tester,
  2. Finder finder, {
  3. double ratio = 0.5,
})

Drags the cell right by the specified ratio of its width.

Implementation

static Future<void> swipeRight(WidgetTester tester, Finder finder,
    {double ratio = 0.5}) async {
  final rect = tester.getRect(finder);
  final clampedRatio = ratio.clamp(0.0, 1.0);
  await tester.drag(finder, Offset(rect.width * clampedRatio, 0),
      warnIfMissed: false);
  await tester.pumpAndSettle();
}