1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Upgrading samples to flutter_lints, part 1 of n (#804)

This commit is contained in:
Brett Morgan
2021-06-05 12:24:28 +10:00
committed by GitHub
parent 14921d0c06
commit 936d1fdaae
230 changed files with 2361 additions and 2444 deletions

View File

@@ -20,7 +20,8 @@ void main() {
var totalCards = tester.widgetList(find.byType(SwipeableCard)).length;
// Swipe out one card.
await tester.drag(find.byType(SwipeableCard).first, Offset(100.0, 0.0));
await tester.drag(
find.byType(SwipeableCard).first, const Offset(100.0, 0.0));
await tester.pumpAndSettle();
// Check if removed properly.
@@ -37,7 +38,8 @@ void main() {
// Swipe out all cards.
for (var i = 0; i < totalCards; i++) {
// Swipe out one by one.
await tester.drag(find.byType(SwipeableCard).first, Offset(100.0, 0.0));
await tester.drag(
find.byType(SwipeableCard).first, const Offset(100.0, 0.0));
await tester.pumpAndSettle();
}
@@ -52,7 +54,8 @@ void main() {
var totalCards = tester.widgetList(find.byType(SwipeableCard)).length;
// Swipe out one card.
await tester.drag(find.byType(SwipeableCard).first, Offset(100.0, 0.0));
await tester.drag(
find.byType(SwipeableCard).first, const Offset(100.0, 0.0));
await tester.pumpAndSettle();
// Tap the Refill button.

View File

@@ -20,7 +20,7 @@ void main() {
expect(imageList.length, 2);
// Swipe the Carousel.
await tester.fling(find.byType(CarouselDemo), Offset(-400, 0), 800);
await tester.fling(find.byType(CarouselDemo), const Offset(-400, 0), 800);
await tester.pumpAndSettle();
// Get the images available on the screen after swipe.