Repository: flutter/flutter
File: packages/flutter/test/material/carousel_theme_test.dart (Dart)

Code before:
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  test('CarouselViewThemeData copyWith, ==, hashCode basics', () {
    expect(const CarouselViewThemeData(), const CarouselViewThemeData().copyWith());
    expect(
      const CarouselViewThemeData().hashCode,
      const CarouselViewThemeData().copyWith().hashCode,
    );
  });

  test('CarouselViewThemeData null fields by default', () {
    const CarouselViewThemeData carouselViewTheme = CarouselViewThemeData();
    expect(carouselViewTheme.backgroundColor, null);
    expect(carouselViewTheme.elevation, null);
    expect(carouselViewTheme.overlayColor, null);
    expect(carouselViewTheme.padding, null);
    expect(carouselViewTheme.shape, null);
  });

  testWidgets('Default DividerThemeData debugFillProperties', (WidgetTester tester) async {
    final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
    const CarouselViewThemeData().debugFillProperties(builder);

    final List<String> description =
        builder.properties
            .where((DiagnosticsNode node) => !node.isFiltered(DiagnosticLevel.info))
            .map((DiagnosticsNode node) => node.toString())
            .toList();

    expect(description, <String>[]);
  });

  testWidgets('CarouselViewThemeData implements debugFillProperties', (WidgetTester tester) async {
    final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
    const CarouselViewThemeData(
      backgroundColor: Color(0xFFFFFFFF),
      elevation: 5.0,
      padding: EdgeInsets.zero,
      shape: RoundedRectangleBorder(),
      overlayColor: MaterialStatePropertyAll<Color>(Colors.red),
    ).debugFillProperties(builder);

    final List<String> description =
        builder.properties
            .where((DiagnosticsNode node) => !node.isFiltered(DiagnosticLevel.info))

Review comment (bug):
```suggestion
  testWidgets('Default CarouselViewThemeData debugFillProperties', (WidgetTester tester) async {
```

Code after:
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  test('CarouselViewThemeData copyWith, ==, hashCode basics', () {
    expect(const CarouselViewThemeData(), const CarouselViewThemeData().copyWith());
    expect(
      const CarouselViewThemeData().hashCode,
      const CarouselViewThemeData().copyWith().hashCode,
    );
  });

  test('CarouselViewThemeData null fields by default', () {
    const CarouselViewThemeData carouselViewTheme = CarouselViewThemeData();
    expect(carouselViewTheme.backgroundColor, null);
    expect(carouselViewTheme.elevation, null);
    expect(carouselViewTheme.overlayColor, null);
    expect(carouselViewTheme.padding, null);
    expect(carouselViewTheme.shape, null);
  });

  testWidgets('Default CarouselViewThemeData debugFillProperties', (WidgetTester tester) async {
    final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
    const CarouselViewThemeData().debugFillProperties(builder);

    final List<String> description =
        builder.properties
            .where((DiagnosticsNode node) => !node.isFiltered(DiagnosticLevel.info))
            .map((DiagnosticsNode node) => node.toString())
            .toList();

    expect(description, <String>[]);
  });

  testWidgets('CarouselViewThemeData implements debugFillProperties', (WidgetTester tester) async {
    final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
    const CarouselViewThemeData(
      backgroundColor: Color(0xFFFFFFFF),
      elevation: 5.0,
      padding: EdgeInsets.zero,
      shape: RoundedRectangleBorder(),
      overlayColor: MaterialStatePropertyAll<Color>(Colors.red),
    ).debugFillProperties(builder);

    final List<String> description =
        builder.properties
            .where((DiagnosticsNode node) => !node.isFiltered(DiagnosticLevel.info))