Unverified Commit f771c9fe authored by Phil Quitslund's avatar Phil Quitslund Committed by GitHub

rename local functions with `_`s (#102991)

parent 0ea21bc5
...@@ -1518,7 +1518,7 @@ void main() { ...@@ -1518,7 +1518,7 @@ void main() {
}); });
testWidgets('DatePicker adapts to MaterialApp dark mode', (WidgetTester tester) async { testWidgets('DatePicker adapts to MaterialApp dark mode', (WidgetTester tester) async {
Widget _buildDatePicker(Brightness brightness) { Widget buildDatePicker(Brightness brightness) {
return MaterialApp( return MaterialApp(
theme: ThemeData(brightness: brightness), theme: ThemeData(brightness: brightness),
home: CupertinoDatePicker( home: CupertinoDatePicker(
...@@ -1530,14 +1530,14 @@ void main() { ...@@ -1530,14 +1530,14 @@ void main() {
} }
// CupertinoDatePicker with light theme. // CupertinoDatePicker with light theme.
await tester.pumpWidget(_buildDatePicker(Brightness.light)); await tester.pumpWidget(buildDatePicker(Brightness.light));
RenderParagraph paragraph = tester.renderObject(find.text('October').first); RenderParagraph paragraph = tester.renderObject(find.text('October').first);
expect(paragraph.text.style!.color, CupertinoColors.label); expect(paragraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
// CupertinoDatePicker with dark theme. // CupertinoDatePicker with dark theme.
await tester.pumpWidget(_buildDatePicker(Brightness.dark)); await tester.pumpWidget(buildDatePicker(Brightness.dark));
paragraph = tester.renderObject(find.text('October').first); paragraph = tester.renderObject(find.text('October').first);
expect(paragraph.text.style!.color, CupertinoColors.label); expect(paragraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
...@@ -1545,7 +1545,7 @@ void main() { ...@@ -1545,7 +1545,7 @@ void main() {
}); });
testWidgets('TimerPicker adapts to MaterialApp dark mode', (WidgetTester tester) async { testWidgets('TimerPicker adapts to MaterialApp dark mode', (WidgetTester tester) async {
Widget _buildTimerPicker(Brightness brightness) { Widget buildTimerPicker(Brightness brightness) {
return MaterialApp( return MaterialApp(
theme: ThemeData(brightness: brightness), theme: ThemeData(brightness: brightness),
home: CupertinoTimerPicker( home: CupertinoTimerPicker(
...@@ -1557,14 +1557,14 @@ void main() { ...@@ -1557,14 +1557,14 @@ void main() {
} }
// CupertinoTimerPicker with light theme. // CupertinoTimerPicker with light theme.
await tester.pumpWidget(_buildTimerPicker(Brightness.light)); await tester.pumpWidget(buildTimerPicker(Brightness.light));
RenderParagraph paragraph = tester.renderObject(find.text('hours')); RenderParagraph paragraph = tester.renderObject(find.text('hours'));
expect(paragraph.text.style!.color, CupertinoColors.label); expect(paragraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
// CupertinoTimerPicker with light theme. // CupertinoTimerPicker with light theme.
await tester.pumpWidget(_buildTimerPicker(Brightness.dark)); await tester.pumpWidget(buildTimerPicker(Brightness.dark));
paragraph = tester.renderObject(find.text('hours')); paragraph = tester.renderObject(find.text('hours'));
expect(paragraph.text.style!.color, CupertinoColors.label); expect(paragraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
......
...@@ -170,7 +170,7 @@ void main() { ...@@ -170,7 +170,7 @@ void main() {
const Widget prefix = Text('Prefix'); const Widget prefix = Text('Prefix');
const Widget helper = Text('Helper'); const Widget helper = Text('Helper');
Widget _buildFormRow(Brightness brightness) { Widget buildFormRow(Brightness brightness) {
return MaterialApp( return MaterialApp(
theme: ThemeData(brightness: brightness), theme: ThemeData(brightness: brightness),
home: const Center( home: const Center(
...@@ -184,7 +184,7 @@ void main() { ...@@ -184,7 +184,7 @@ void main() {
} }
// CupertinoFormRow with light theme. // CupertinoFormRow with light theme.
await tester.pumpWidget(_buildFormRow(Brightness.light)); await tester.pumpWidget(buildFormRow(Brightness.light));
RenderParagraph helperParagraph = tester.renderObject(find.text('Helper')); RenderParagraph helperParagraph = tester.renderObject(find.text('Helper'));
expect(helperParagraph.text.style!.color, CupertinoColors.label); expect(helperParagraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
...@@ -195,7 +195,7 @@ void main() { ...@@ -195,7 +195,7 @@ void main() {
expect(prefixParagraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); expect(prefixParagraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
// CupertinoFormRow with light theme. // CupertinoFormRow with light theme.
await tester.pumpWidget(_buildFormRow(Brightness.dark)); await tester.pumpWidget(buildFormRow(Brightness.dark));
helperParagraph = tester.renderObject(find.text('Helper')); helperParagraph = tester.renderObject(find.text('Helper'));
expect(helperParagraph.text.style!.color, CupertinoColors.label); expect(helperParagraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
......
...@@ -425,7 +425,7 @@ void main() { ...@@ -425,7 +425,7 @@ void main() {
}); });
testWidgets('Picker adapts to MaterialApp dark mode', (WidgetTester tester) async { testWidgets('Picker adapts to MaterialApp dark mode', (WidgetTester tester) async {
Widget _buildCupertinoPicker(Brightness brightness) { Widget buildCupertinoPicker(Brightness brightness) {
return MaterialApp( return MaterialApp(
theme: ThemeData(brightness: brightness), theme: ThemeData(brightness: brightness),
home: Align( home: Align(
...@@ -450,14 +450,14 @@ void main() { ...@@ -450,14 +450,14 @@ void main() {
} }
// CupertinoPicker with light theme. // CupertinoPicker with light theme.
await tester.pumpWidget(_buildCupertinoPicker(Brightness.light)); await tester.pumpWidget(buildCupertinoPicker(Brightness.light));
RenderParagraph paragraph = tester.renderObject(find.text('1')); RenderParagraph paragraph = tester.renderObject(find.text('1'));
expect(paragraph.text.style!.color, CupertinoColors.label); expect(paragraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse); expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
// CupertinoPicker with dark theme. // CupertinoPicker with dark theme.
await tester.pumpWidget(_buildCupertinoPicker(Brightness.dark)); await tester.pumpWidget(buildCupertinoPicker(Brightness.dark));
paragraph = tester.renderObject(find.text('1')); paragraph = tester.renderObject(find.text('1'));
expect(paragraph.text.style!.color, CupertinoColors.label); expect(paragraph.text.style!.color, CupertinoColors.label);
// Text style should not return unresolved color. // Text style should not return unresolved color.
......
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