Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit f771c9f

Browse files
authored
rename local functions with _s (#102991)
1 parent 0ea21bc commit f771c9f

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

packages/flutter/test/cupertino/date_picker_test.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ void main() {
15181518
});
15191519

15201520
testWidgets('DatePicker adapts to MaterialApp dark mode', (WidgetTester tester) async {
1521-
Widget _buildDatePicker(Brightness brightness) {
1521+
Widget buildDatePicker(Brightness brightness) {
15221522
return MaterialApp(
15231523
theme: ThemeData(brightness: brightness),
15241524
home: CupertinoDatePicker(
@@ -1530,22 +1530,22 @@ void main() {
15301530
}
15311531

15321532
// CupertinoDatePicker with light theme.
1533-
await tester.pumpWidget(_buildDatePicker(Brightness.light));
1533+
await tester.pumpWidget(buildDatePicker(Brightness.light));
15341534
RenderParagraph paragraph = tester.renderObject(find.text('October').first);
15351535
expect(paragraph.text.style!.color, CupertinoColors.label);
15361536
// Text style should not return unresolved color.
15371537
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
15381538

15391539
// CupertinoDatePicker with dark theme.
1540-
await tester.pumpWidget(_buildDatePicker(Brightness.dark));
1540+
await tester.pumpWidget(buildDatePicker(Brightness.dark));
15411541
paragraph = tester.renderObject(find.text('October').first);
15421542
expect(paragraph.text.style!.color, CupertinoColors.label);
15431543
// Text style should not return unresolved color.
15441544
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
15451545
});
15461546

15471547
testWidgets('TimerPicker adapts to MaterialApp dark mode', (WidgetTester tester) async {
1548-
Widget _buildTimerPicker(Brightness brightness) {
1548+
Widget buildTimerPicker(Brightness brightness) {
15491549
return MaterialApp(
15501550
theme: ThemeData(brightness: brightness),
15511551
home: CupertinoTimerPicker(
@@ -1557,14 +1557,14 @@ void main() {
15571557
}
15581558

15591559
// CupertinoTimerPicker with light theme.
1560-
await tester.pumpWidget(_buildTimerPicker(Brightness.light));
1560+
await tester.pumpWidget(buildTimerPicker(Brightness.light));
15611561
RenderParagraph paragraph = tester.renderObject(find.text('hours'));
15621562
expect(paragraph.text.style!.color, CupertinoColors.label);
15631563
// Text style should not return unresolved color.
15641564
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
15651565

15661566
// CupertinoTimerPicker with light theme.
1567-
await tester.pumpWidget(_buildTimerPicker(Brightness.dark));
1567+
await tester.pumpWidget(buildTimerPicker(Brightness.dark));
15681568
paragraph = tester.renderObject(find.text('hours'));
15691569
expect(paragraph.text.style!.color, CupertinoColors.label);
15701570
// Text style should not return unresolved color.

packages/flutter/test/cupertino/form_row_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void main() {
170170
const Widget prefix = Text('Prefix');
171171
const Widget helper = Text('Helper');
172172

173-
Widget _buildFormRow(Brightness brightness) {
173+
Widget buildFormRow(Brightness brightness) {
174174
return MaterialApp(
175175
theme: ThemeData(brightness: brightness),
176176
home: const Center(
@@ -184,7 +184,7 @@ void main() {
184184
}
185185

186186
// CupertinoFormRow with light theme.
187-
await tester.pumpWidget(_buildFormRow(Brightness.light));
187+
await tester.pumpWidget(buildFormRow(Brightness.light));
188188
RenderParagraph helperParagraph = tester.renderObject(find.text('Helper'));
189189
expect(helperParagraph.text.style!.color, CupertinoColors.label);
190190
// Text style should not return unresolved color.
@@ -195,7 +195,7 @@ void main() {
195195
expect(prefixParagraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
196196

197197
// CupertinoFormRow with light theme.
198-
await tester.pumpWidget(_buildFormRow(Brightness.dark));
198+
await tester.pumpWidget(buildFormRow(Brightness.dark));
199199
helperParagraph = tester.renderObject(find.text('Helper'));
200200
expect(helperParagraph.text.style!.color, CupertinoColors.label);
201201
// Text style should not return unresolved color.

packages/flutter/test/cupertino/picker_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ void main() {
425425
});
426426

427427
testWidgets('Picker adapts to MaterialApp dark mode', (WidgetTester tester) async {
428-
Widget _buildCupertinoPicker(Brightness brightness) {
428+
Widget buildCupertinoPicker(Brightness brightness) {
429429
return MaterialApp(
430430
theme: ThemeData(brightness: brightness),
431431
home: Align(
@@ -450,14 +450,14 @@ void main() {
450450
}
451451

452452
// CupertinoPicker with light theme.
453-
await tester.pumpWidget(_buildCupertinoPicker(Brightness.light));
453+
await tester.pumpWidget(buildCupertinoPicker(Brightness.light));
454454
RenderParagraph paragraph = tester.renderObject(find.text('1'));
455455
expect(paragraph.text.style!.color, CupertinoColors.label);
456456
// Text style should not return unresolved color.
457457
expect(paragraph.text.style!.color.toString().contains('UNRESOLVED'), isFalse);
458458

459459
// CupertinoPicker with dark theme.
460-
await tester.pumpWidget(_buildCupertinoPicker(Brightness.dark));
460+
await tester.pumpWidget(buildCupertinoPicker(Brightness.dark));
461461
paragraph = tester.renderObject(find.text('1'));
462462
expect(paragraph.text.style!.color, CupertinoColors.label);
463463
// Text style should not return unresolved color.

0 commit comments

Comments
 (0)