chore: linting
This commit is contained in:
+8
-8
@@ -208,9 +208,9 @@ void main() {
|
||||
|
||||
expect(tester.getTopLeft(find.text('Item 0')), const Offset(10, 10));
|
||||
expect(tester.getTopLeft(find.text('Item 1')),
|
||||
const Offset(10 + itemWidth, 10));
|
||||
const Offset(itemWidth + 10, 10));
|
||||
expect(tester.getBottomRight(find.text('Item 1')),
|
||||
const Offset(10 + 2 * itemWidth, screenHeight - 10));
|
||||
const Offset(10 + itemWidth * 2, screenHeight - 10));
|
||||
|
||||
unawaited(
|
||||
itemScrollController.scrollTo(index: 490, duration: scrollDuration));
|
||||
@@ -240,9 +240,9 @@ void main() {
|
||||
|
||||
expect(tester.getTopLeft(find.text('Item 0')), const Offset(10, 10));
|
||||
expect(tester.getTopLeft(find.text('Item 2')),
|
||||
const Offset(10 + 2 * itemWidth, 10));
|
||||
const Offset(10 + itemWidth * 2, 10));
|
||||
expect(tester.getTopLeft(find.text('Item 3')),
|
||||
const Offset(10 + 3 * itemWidth, 10));
|
||||
const Offset(10 + itemWidth * 3, 10));
|
||||
});
|
||||
|
||||
testWidgets('padding test - reversed - centered sliver at right',
|
||||
@@ -258,9 +258,9 @@ void main() {
|
||||
expect(tester.getTopRight(find.text('Item 0')),
|
||||
const Offset(screenWidth - 10, 10));
|
||||
expect(tester.getTopRight(find.text('Item 1')),
|
||||
const Offset(screenWidth - (10 + itemWidth), 10));
|
||||
const Offset(screenWidth - (itemWidth + 10), 10));
|
||||
expect(tester.getBottomLeft(find.text('Item 1')),
|
||||
const Offset(screenWidth - (10 + 2 * itemWidth), screenHeight - 10));
|
||||
const Offset(screenWidth - (10 + itemWidth * 2), screenHeight - 10));
|
||||
|
||||
unawaited(
|
||||
itemScrollController.scrollTo(index: 490, duration: scrollDuration));
|
||||
@@ -291,8 +291,8 @@ void main() {
|
||||
expect(tester.getTopRight(find.text('Item 0')),
|
||||
const Offset(screenWidth - 10, 10));
|
||||
expect(tester.getTopRight(find.text('Item 2')),
|
||||
const Offset(screenWidth - (10 + 2 * itemWidth), 10));
|
||||
const Offset(screenWidth - (10 + itemWidth * 2), 10));
|
||||
expect(tester.getTopRight(find.text('Item 3')),
|
||||
const Offset(screenWidth - (10 + 3 * itemWidth), 10));
|
||||
const Offset(screenWidth - (10 + itemWidth * 3), 10));
|
||||
});
|
||||
}
|
||||
|
||||
+3
-3
@@ -197,7 +197,7 @@ void main() {
|
||||
await setUpWidgetTest(tester, topItem: 5);
|
||||
|
||||
await tester.drag(
|
||||
find.byType(PositionedList), const Offset(0, 2 * itemHeight));
|
||||
find.byType(PositionedList), const Offset(0, itemHeight * 2));
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('Item 2'), findsNothing);
|
||||
@@ -248,7 +248,7 @@ void main() {
|
||||
await setUpWidgetTest(tester, scrollController: scrollController);
|
||||
await tester.pump();
|
||||
|
||||
scrollController.jumpTo(5 * itemHeight);
|
||||
scrollController.jumpTo(itemHeight * 5);
|
||||
await tester.pump();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -307,7 +307,7 @@ void main() {
|
||||
await setUpWidgetTest(tester,
|
||||
topItem: 5, scrollController: scrollController);
|
||||
|
||||
scrollController.jumpTo(20 * itemHeight);
|
||||
scrollController.jumpTo(itemHeight * 20);
|
||||
await tester.pump();
|
||||
|
||||
expect(
|
||||
|
||||
+4
-4
@@ -162,7 +162,7 @@ void main() {
|
||||
await setUpWidgetTest(tester, topItem: 5);
|
||||
|
||||
await tester.drag(
|
||||
find.byType(PositionedList), const Offset(0, 2 * itemHeight));
|
||||
find.byType(PositionedList), const Offset(0, itemHeight * 2));
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('Item 6'), findsNothing);
|
||||
@@ -186,7 +186,7 @@ void main() {
|
||||
await setUpWidgetTest(tester, scrollController: scrollController);
|
||||
await tester.pump();
|
||||
|
||||
scrollController.jumpTo(5 * itemHeight);
|
||||
scrollController.jumpTo(itemHeight * 5);
|
||||
await tester.pump();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -214,7 +214,7 @@ void main() {
|
||||
await setUpWidgetTest(tester,
|
||||
topItem: 5, scrollController: scrollController);
|
||||
|
||||
scrollController.jumpTo(2 * itemHeight);
|
||||
scrollController.jumpTo(itemHeight * 2);
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('Item 6'), findsNothing);
|
||||
@@ -242,7 +242,7 @@ void main() {
|
||||
testWidgets('List positioned with 5 at bottom and initial scroll offset',
|
||||
(WidgetTester tester) async {
|
||||
final scrollController =
|
||||
ScrollController(initialScrollOffset: 2 * itemHeight);
|
||||
ScrollController(initialScrollOffset: itemHeight * 2);
|
||||
await setUpWidgetTest(tester,
|
||||
topItem: 5, scrollController: scrollController);
|
||||
|
||||
|
||||
+4
-4
@@ -200,9 +200,9 @@ void main() {
|
||||
expect(tester.getBottomLeft(find.text('Item 0')),
|
||||
const Offset(10, screenHeight - 10));
|
||||
expect(tester.getBottomLeft(find.text('Item 1')),
|
||||
const Offset(10, screenHeight - (10 + itemHeight)));
|
||||
const Offset(10, screenHeight - (itemHeight + 10)));
|
||||
expect(tester.getTopRight(find.text('Item 1')),
|
||||
const Offset(screenWidth - 10, screenHeight - (10 + 2 * itemHeight)));
|
||||
const Offset(screenWidth - 10, screenHeight - (10 + itemHeight * 2)));
|
||||
|
||||
unawaited(
|
||||
itemScrollController.scrollTo(index: 490, duration: scrollDuration));
|
||||
@@ -232,8 +232,8 @@ void main() {
|
||||
expect(tester.getBottomLeft(find.text('Item 0')),
|
||||
const Offset(10, screenHeight - 10));
|
||||
expect(tester.getBottomLeft(find.text('Item 2')),
|
||||
const Offset(10, screenHeight - (10 + 2 * itemHeight)));
|
||||
const Offset(10, screenHeight - (10 + itemHeight * 2)));
|
||||
expect(tester.getBottomLeft(find.text('Item 3')),
|
||||
const Offset(10, screenHeight - (10 + 3 * itemHeight)));
|
||||
const Offset(10, screenHeight - (10 + itemHeight * 3)));
|
||||
});
|
||||
}
|
||||
|
||||
+8
-8
@@ -1211,7 +1211,7 @@ void main() {
|
||||
itemScrollController: itemScrollController, initialIndex: 5);
|
||||
|
||||
await tester.drag(
|
||||
find.byType(ScrollablePositionedList), const Offset(0, 2 * itemHeight));
|
||||
find.byType(ScrollablePositionedList), const Offset(0, itemHeight * 2));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final indexSemantics3 = tester.widget<IndexedSemantics>(find.ancestor(
|
||||
@@ -1234,7 +1234,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.drag(
|
||||
find.byType(ScrollablePositionedList), const Offset(0, 2 * itemHeight));
|
||||
find.byType(ScrollablePositionedList), const Offset(0, itemHeight * 2));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final indexSemantics3b = tester.widget<IndexedSemantics>(find.ancestor(
|
||||
@@ -1339,9 +1339,9 @@ void main() {
|
||||
|
||||
expect(tester.getTopLeft(find.text('Item 0')), const Offset(10, 10));
|
||||
expect(tester.getTopLeft(find.text('Item 1')),
|
||||
const Offset(10, 10 + itemHeight));
|
||||
const Offset(10, itemHeight + 10));
|
||||
expect(tester.getTopRight(find.text('Item 1')),
|
||||
const Offset(screenWidth - 10, 10 + itemHeight));
|
||||
const Offset(screenWidth - 10, itemHeight + 10));
|
||||
|
||||
unawaited(
|
||||
itemScrollController.scrollTo(index: 490, duration: scrollDuration));
|
||||
@@ -1371,9 +1371,9 @@ void main() {
|
||||
|
||||
expect(tester.getTopLeft(find.text('Item 0')), const Offset(10, 10));
|
||||
expect(tester.getTopLeft(find.text('Item 2')),
|
||||
const Offset(10, 10 + 2 * itemHeight));
|
||||
const Offset(10, 10 + itemHeight * 2));
|
||||
expect(tester.getTopLeft(find.text('Item 3')),
|
||||
const Offset(10, 10 + 3 * itemHeight));
|
||||
const Offset(10, 10 + itemHeight * 3));
|
||||
});
|
||||
|
||||
testWidgets('padding - first element centered - scroll up',
|
||||
@@ -1862,7 +1862,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('Large minCacheExtent', (WidgetTester tester) async {
|
||||
await setUpWidgetTest(tester, minCacheExtent: 200 * itemHeight);
|
||||
await setUpWidgetTest(tester, minCacheExtent: itemHeight * 200);
|
||||
|
||||
expect(find.text('Item 100', skipOffstage: false), findsOneWidget);
|
||||
});
|
||||
@@ -1911,7 +1911,7 @@ void main() {
|
||||
await setUpWidgetTest(
|
||||
tester,
|
||||
itemScrollController: itemScrollController,
|
||||
minCacheExtent: 200 * itemHeight,
|
||||
minCacheExtent: itemHeight * 200,
|
||||
);
|
||||
|
||||
var fadeTransition = tester.widget<FadeTransition>(find
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ void main() {
|
||||
await setUpWidgetTest(tester, itemCount: 3, topItem: 1);
|
||||
|
||||
await tester.drag(
|
||||
find.byType(PositionedList), const Offset(0, 2 * itemHeight));
|
||||
find.byType(PositionedList), const Offset(0, itemHeight * 2));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Item 0'), findsOneWidget);
|
||||
|
||||
+3
-3
@@ -320,7 +320,7 @@ void main() {
|
||||
await setUpWidgetTest(tester, initialIndex: 5);
|
||||
|
||||
await tester.drag(
|
||||
find.byType(ScrollablePositionedList), const Offset(0, 4 * itemHeight));
|
||||
find.byType(ScrollablePositionedList), const Offset(0, itemHeight * 4));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final indexSemantics3 = tester.widget<IndexedSemantics>(find.ancestor(
|
||||
@@ -401,9 +401,9 @@ void main() {
|
||||
|
||||
expect(tester.getTopLeft(find.text('Item 0')), const Offset(10, 10));
|
||||
expect(tester.getTopLeft(find.text('Item 1')),
|
||||
const Offset(10, 10 + itemHeight + separatorHeight));
|
||||
const Offset(10, itemHeight + 10 + separatorHeight));
|
||||
expect(tester.getTopRight(find.text('Item 1')),
|
||||
const Offset(screenWidth - 10, 10 + itemHeight + separatorHeight));
|
||||
const Offset(screenWidth - 10, itemHeight + 10 + separatorHeight));
|
||||
|
||||
unawaited(
|
||||
itemScrollController.scrollTo(index: 494, duration: scrollDuration));
|
||||
|
||||
+2
-2
@@ -166,9 +166,9 @@ void main() {
|
||||
|
||||
expect(tester.getTopLeft(find.text('Item 0')), const Offset(10, 10));
|
||||
expect(tester.getTopLeft(find.text('Item 1')),
|
||||
const Offset(10 + itemWidth + separatorWidth, 10));
|
||||
const Offset(itemWidth + 10 + separatorWidth, 10));
|
||||
expect(tester.getBottomRight(find.text('Item 1')),
|
||||
const Offset(10 + 2 * itemWidth + separatorWidth, screenHeight - 10));
|
||||
const Offset(10 + itemWidth * 2 + separatorWidth, screenHeight - 10));
|
||||
|
||||
unawaited(
|
||||
itemScrollController.scrollTo(index: 494, duration: scrollDuration));
|
||||
|
||||
Reference in New Issue
Block a user