Skip to content

Commit

Permalink
rename local functions with _s (#102991)
Browse files Browse the repository at this point in the history
  • Loading branch information
pq authored May 5, 2022
1 parent 0ea21bc commit f771c9f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions packages/flutter/test/cupertino/date_picker_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -1530,22 +1530,22 @@ 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.
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
});

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(
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/test/cupertino/form_row_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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.
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/test/cupertino/picker_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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.
Expand Down

0 comments on commit f771c9f

Please sign in to comment.