Repository: flutter/flutter
File: packages/flutter/lib/src/material/carousel_theme.dart (Dart)

Code before:
    return other is CarouselViewThemeData &&
        other.backgroundColor == backgroundColor &&
        other.elevation == elevation &&
        other.shape == shape &&
        other.overlayColor == overlayColor &&
        other.padding == padding;
  }

  @override
  void debugFillProperties(DiagnosticPropertiesBuilder properties) {
    super.debugFillProperties(properties);
    properties.add(ColorProperty('backgroundColor', backgroundColor, defaultValue: null));
    properties.add(DoubleProperty('elevation', elevation, defaultValue: null));
    properties.add(DiagnosticsProperty<OutlinedBorder>('shape', shape, defaultValue: null));
    properties.add(
      DiagnosticsProperty<WidgetStateProperty<Color?>>(
        'overlayColor',
        overlayColor,
        defaultValue: null,
      ),
    );
    properties.add(DiagnosticsProperty<EdgeInsets>('padding', padding, defaultValue: null));
  }
}

/// Applies a carousel theme to descendant carousel widgets.
///
/// Descendant widgets obtain the current theme's [CarouselViewThemeData] using
/// [CarouselViewTheme.of]. When a widget uses [CarouselViewTheme.of], it is automatically
/// rebuilt if the theme later changes.
///
/// A carousel theme can be specified as part of the overall Material theme using
/// [ThemeData.carouselViewTheme].
///
/// See also:
///
///  * [CarouselViewThemeData], which describes the actual configuration of a carousel
///    theme.
///  * [Theme], which controls the overall theme inheritance.
class CarouselViewTheme extends InheritedTheme {
  /// Creates a carousel theme that configures all descendant [CarouselView] widgets.
  const CarouselViewTheme({super.key, required this.data, required super.child});

  /// The properties for descendant carousel widgets.
  final CarouselViewThemeData data;

  /// Returns the configuration [data] from the closest [CarouselViewTheme] ancestor.
  /// If there is no ancestor, it returns [ThemeData.carouselViewTheme].
  static CarouselViewThemeData of(BuildContext context) {
    final CarouselViewTheme? inheritedTheme =
        context.dependOnInheritedWidgetOfExactType<CarouselViewTheme>();

Review comment (suggestion):
```suggestion
/// Applies a carousel theme to descendant [CarouselView] widgets.
```

Code after:
        other.shape == shape &&
        other.overlayColor == overlayColor &&
        other.padding == padding;
  }

  @override
  void debugFillProperties(DiagnosticPropertiesBuilder properties) {
    super.debugFillProperties(properties);
    properties.add(ColorProperty('backgroundColor', backgroundColor, defaultValue: null));
    properties.add(DoubleProperty('elevation', elevation, defaultValue: null));
    properties.add(DiagnosticsProperty<OutlinedBorder>('shape', shape, defaultValue: null));
    properties.add(
      DiagnosticsProperty<WidgetStateProperty<Color?>>(
        'overlayColor',
        overlayColor,
        defaultValue: null,
      ),
    );
    properties.add(DiagnosticsProperty<EdgeInsets>('padding', padding, defaultValue: null));
  }
}

/// Applies a carousel theme to descendant [CarouselView] widgets.
///
/// Descendant widgets obtain the current theme's [CarouselViewThemeData] using
/// [CarouselViewTheme.of]. When a widget uses [CarouselViewTheme.of], it is automatically
/// rebuilt if the theme later changes.
///
/// A carousel theme can be specified as part of the overall Material theme using
/// [ThemeData.carouselViewTheme].
///
/// See also:
///
///  * [CarouselViewThemeData], which describes the actual configuration of a carousel
///    theme.
///  * [Theme], which controls the overall theme inheritance.
class CarouselViewTheme extends InheritedTheme {
  /// Creates a carousel theme that configures all descendant [CarouselView] widgets.
  const CarouselViewTheme({super.key, required this.data, required super.child});

  /// The properties for descendant carousel widgets.
  final CarouselViewThemeData data;

  /// Returns the configuration [data] from the closest [CarouselViewTheme] ancestor.
  ///
  /// If there is no ancestor, it returns [ThemeData.carouselViewTheme].
  static CarouselViewThemeData of(BuildContext context) {
    final CarouselViewTheme? inheritedTheme =
        context.dependOnInheritedWidgetOfExactType<CarouselViewTheme>();
    return inheritedTheme?.data ?? Theme.of(context).carouselViewTheme;
  }