Commit 29d5210d authored by Brian Wilkerson's avatar Brian Wilkerson Committed by Devon Carew

Use constant durations in more places (#24306)

parent 2ae13799
......@@ -113,7 +113,7 @@ void main() {
await tester.tap(find.byType(Icon));
await tester.pump();
await tester.pump(Duration(milliseconds: 10));
await tester.pump(const Duration(milliseconds: 10));
expect(tester.hasRunningAnimations, isTrue);
await tester.pumpAndSettle();
......@@ -126,7 +126,7 @@ void main() {
await tester.tap(find.byType(Icon));
await tester.pump();
await tester.pump(Duration(milliseconds: 10));
await tester.pump(const Duration(milliseconds: 10));
expect(tester.hasRunningAnimations, isTrue);
await tester.pumpAndSettle();
......@@ -149,25 +149,25 @@ void main() {
// Icon starts to rotate down.
await tester.tap(find.byType(Icon));
await tester.pump();
await tester.pump(Duration(milliseconds: 100));
await tester.pump(const Duration(milliseconds: 100));
expect(tester.hasRunningAnimations, isTrue);
// Icon starts to rotate up mid animation.
await tester.tap(find.byType(Icon));
await tester.pump();
await tester.pump(Duration(milliseconds: 100));
await tester.pump(const Duration(milliseconds: 100));
expect(tester.hasRunningAnimations, isTrue);
// Icon starts to rotate down again still mid animation.
await tester.tap(find.byType(Icon));
await tester.pump();
await tester.pump(Duration(milliseconds: 100));
await tester.pump(const Duration(milliseconds: 100));
expect(tester.hasRunningAnimations, isTrue);
// Icon starts to rotate up to its original position mid animation.
await tester.tap(find.byType(Icon));
await tester.pump();
await tester.pump(Duration(milliseconds: 100));
await tester.pump(const Duration(milliseconds: 100));
expect(tester.hasRunningAnimations, isTrue);
await tester.pumpAndSettle();
......
......@@ -15,7 +15,7 @@ void main() {
test('can find a time ago', () {
final SystemClock clock = SystemClock.fixed(DateTime(1991, 8, 23));
expect(clock.ago(Duration(days: 10)), DateTime(1991, 8, 13));
expect(clock.ago(const Duration(days: 10)), DateTime(1991, 8, 13));
});
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment