[Benchmark: platform_views_layout] show and hide more PlatformViews (#110688)

This commit is contained in:
Chris Yang 2022-09-02 10:05:55 -07:00 committed by GitHub
parent 0c82d9676f
commit 1560d0cef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,16 +33,18 @@ void main() {
final SerializableFinder list = find.byValueKey(listKey); final SerializableFinder list = find.byValueKey(listKey);
expect(list, isNotNull); expect(list, isNotNull);
// Scroll down for (int j = 0; j < 5; j ++) {
for (int i = 0; i < 5; i += 1) { // Scroll down
await driver.scroll(list, 0.0, -300.0, const Duration(milliseconds: 300)); for (int i = 0; i < 5; i += 1) {
await Future<void>.delayed(const Duration(milliseconds: 500)); await driver.scroll(list, 0.0, -300.0, const Duration(milliseconds: 300));
} await Future<void>.delayed(const Duration(milliseconds: 500));
}
// Scroll up // Scroll up
for (int i = 0; i < 5; i += 1) { for (int i = 0; i < 5; i += 1) {
await driver.scroll(list, 0.0, 300.0, const Duration(milliseconds: 300)); await driver.scroll(list, 0.0, 300.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500)); await Future<void>.delayed(const Duration(milliseconds: 500));
}
} }
}); });