rename local functions with _s (#102991)

This commit is contained in:
Phil Quitslund
2022-05-05 09:49:12 -07:00
committed by GitHub
parent 0ea21bc5b3
commit f771c9fee7
3 changed files with 12 additions and 12 deletions

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.