From f771c9fee734efb4912ecc2615990318b91a8c15 Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Thu, 5 May 2022 09:49:12 -0700 Subject: [PATCH] rename local functions with `_`s (#102991) --- .../flutter/test/cupertino/date_picker_test.dart | 12 ++++++------ packages/flutter/test/cupertino/form_row_test.dart | 6 +++--- packages/flutter/test/cupertino/picker_test.dart | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/flutter/test/cupertino/date_picker_test.dart b/packages/flutter/test/cupertino/date_picker_test.dart index 1d60aa2642c6..5a2667fdfa62 100644 --- a/packages/flutter/test/cupertino/date_picker_test.dart +++ b/packages/flutter/test/cupertino/date_picker_test.dart @@ -1518,7 +1518,7 @@ void main() { }); testWidgets('DatePicker adapts to MaterialApp dark mode', (WidgetTester tester) async { - Widget _buildDatePicker(Brightness brightness) { + Widget buildDatePicker(Brightness brightness) { return MaterialApp( theme: ThemeData(brightness: brightness), home: CupertinoDatePicker( @@ -1530,14 +1530,14 @@ void main() { } // CupertinoDatePicker with light theme. - await tester.pumpWidget(_buildDatePicker(Brightness.light)); + await tester.pumpWidget(buildDatePicker(Brightness.light)); RenderParagraph paragraph = tester.renderObject(find.text('October').first); expect(paragraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color. expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); // CupertinoDatePicker with dark theme. - await tester.pumpWidget(_buildDatePicker(Brightness.dark)); + await tester.pumpWidget(buildDatePicker(Brightness.dark)); paragraph = tester.renderObject(find.text('October').first); expect(paragraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color. @@ -1545,7 +1545,7 @@ void main() { }); testWidgets('TimerPicker adapts to MaterialApp dark mode', (WidgetTester tester) async { - Widget _buildTimerPicker(Brightness brightness) { + Widget buildTimerPicker(Brightness brightness) { return MaterialApp( theme: ThemeData(brightness: brightness), home: CupertinoTimerPicker( @@ -1557,14 +1557,14 @@ void main() { } // CupertinoTimerPicker with light theme. - await tester.pumpWidget(_buildTimerPicker(Brightness.light)); + await tester.pumpWidget(buildTimerPicker(Brightness.light)); RenderParagraph paragraph = tester.renderObject(find.text('hours')); expect(paragraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color. expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); // CupertinoTimerPicker with light theme. - await tester.pumpWidget(_buildTimerPicker(Brightness.dark)); + await tester.pumpWidget(buildTimerPicker(Brightness.dark)); paragraph = tester.renderObject(find.text('hours')); expect(paragraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color. diff --git a/packages/flutter/test/cupertino/form_row_test.dart b/packages/flutter/test/cupertino/form_row_test.dart index c64515d64fc1..9cb079905a6d 100644 --- a/packages/flutter/test/cupertino/form_row_test.dart +++ b/packages/flutter/test/cupertino/form_row_test.dart @@ -170,7 +170,7 @@ void main() { const Widget prefix = Text('Prefix'); const Widget helper = Text('Helper'); - Widget _buildFormRow(Brightness brightness) { + Widget buildFormRow(Brightness brightness) { return MaterialApp( theme: ThemeData(brightness: brightness), home: const Center( @@ -184,7 +184,7 @@ void main() { } // CupertinoFormRow with light theme. - await tester.pumpWidget(_buildFormRow(Brightness.light)); + await tester.pumpWidget(buildFormRow(Brightness.light)); RenderParagraph helperParagraph = tester.renderObject(find.text('Helper')); expect(helperParagraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color. @@ -195,7 +195,7 @@ void main() { expect(prefixParagraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); // CupertinoFormRow with light theme. - await tester.pumpWidget(_buildFormRow(Brightness.dark)); + await tester.pumpWidget(buildFormRow(Brightness.dark)); helperParagraph = tester.renderObject(find.text('Helper')); expect(helperParagraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color. diff --git a/packages/flutter/test/cupertino/picker_test.dart b/packages/flutter/test/cupertino/picker_test.dart index 68fb3bdeb70e..a3766a1cc74a 100644 --- a/packages/flutter/test/cupertino/picker_test.dart +++ b/packages/flutter/test/cupertino/picker_test.dart @@ -425,7 +425,7 @@ void main() { }); testWidgets('Picker adapts to MaterialApp dark mode', (WidgetTester tester) async { - Widget _buildCupertinoPicker(Brightness brightness) { + Widget buildCupertinoPicker(Brightness brightness) { return MaterialApp( theme: ThemeData(brightness: brightness), home: Align( @@ -450,14 +450,14 @@ void main() { } // CupertinoPicker with light theme. - await tester.pumpWidget(_buildCupertinoPicker(Brightness.light)); + await tester.pumpWidget(buildCupertinoPicker(Brightness.light)); RenderParagraph paragraph = tester.renderObject(find.text('1')); expect(paragraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color. expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); // CupertinoPicker with dark theme. - await tester.pumpWidget(_buildCupertinoPicker(Brightness.dark)); + await tester.pumpWidget(buildCupertinoPicker(Brightness.dark)); paragraph = tester.renderObject(find.text('1')); expect(paragraph.text.style!.color, CupertinoColors.label); // Text style should not return unresolved color.