[dev, bots, examples] rename local functions with _s (#102703)

This commit is contained in:
Phil Quitslund
2022-04-28 10:44:06 -07:00
committed by GitHub
parent 6a443138cd
commit 80849adee1
8 changed files with 31 additions and 31 deletions

View File

@@ -16,7 +16,7 @@ void main() {
body: (WidgetController controller) async {
final Finder nestedScroll = find.byKey(const ValueKey<String>('tabbar_view'));
expect(nestedScroll, findsOneWidget);
Future<void> _scrollOnce(double offset) async {
Future<void> scrollOnce(double offset) async {
await controller.timedDrag(
nestedScroll,
Offset(-offset, 0.0),
@@ -25,10 +25,10 @@ void main() {
await Future<void>.delayed(const Duration(milliseconds: 500));
}
for (int i = 0; i < 3; i += 1) {
await _scrollOnce(-300.0);
await _scrollOnce(-300.0);
await _scrollOnce(300.0);
await _scrollOnce(300.0);
await scrollOnce(-300.0);
await scrollOnce(-300.0);
await scrollOnce(300.0);
await scrollOnce(300.0);
}
},
);

View File

@@ -14,7 +14,7 @@ void main() {
pageDelay: const Duration(seconds: 1),
driverOps: (FlutterDriver driver) async {
final SerializableFinder tabBarView = find.byValueKey('tabbar_view_complexity');
Future<void> _scrollOnce(double offset) async {
Future<void> scrollOnce(double offset) async {
// Technically it's not scrolling but moving
await driver.scroll(tabBarView, offset, 0.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
@@ -22,8 +22,8 @@ void main() {
// When we eventually add more test panes we will want to tweak these
// to go through all the panes
for (int i = 0; i < 6; i += 1) {
await _scrollOnce(-300.0);
await _scrollOnce(300.0);
await scrollOnce(-300.0);
await scrollOnce(300.0);
}
},
);

View File

@@ -14,16 +14,16 @@ void main() {
pageDelay: const Duration(seconds: 1),
driverOps: (FlutterDriver driver) async {
final SerializableFinder tabBarView = find.byValueKey('tabbar_view');
Future<void> _scrollOnce(double offset) async {
Future<void> scrollOnce(double offset) async {
// Technically it's not scrolling but moving
await driver.scroll(tabBarView, offset, 0.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
}
for (int i = 0; i < 3; i += 1) {
await _scrollOnce(-300.0);
await _scrollOnce(-300.0);
await _scrollOnce(300.0);
await _scrollOnce(300.0);
await scrollOnce(-300.0);
await scrollOnce(-300.0);
await scrollOnce(300.0);
await scrollOnce(300.0);
}
},
);