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

Code before:
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:ui' show lerpDouble;

import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';

import 'carousel.dart';
import 'color_scheme.dart';
import 'material.dart';
import 'theme.dart';

/// Defines default property values for descendant [CarouselView] widgets.
///
/// Descendant widgets obtain the current [CarouselViewThemeData] object using
/// `CarouselTheme.of(context)`. Instances of [CarouselViewThemeData] can be
/// customized with [CarouselViewThemeData.copyWith].
///
/// Typically a [CarouselViewThemeData] is specified as part of the overall [Theme]
/// with [ThemeData.carouselViewTheme].
///
/// All [CarouselViewThemeData] properties are `null` by default. When null, the [CarouselView]
/// will provide its own defaults.
///
/// See also:
///
///  * [CarouselViewTheme], an [InheritedWidget] that propagates the theme to its descendants.
///  * [ThemeData], which describes the overall theme information for the application.
@immutable
class CarouselViewThemeData with Diagnosticable {
  /// Creates a theme that can be used for [ThemeData.carouselViewTheme].
  const CarouselViewThemeData({
    this.elevation,
    this.backgroundColor,
    this.overlayColor,
    this.shape,
    this.padding,
  });

  /// The padding between the carousel's edge and its children.
  final EdgeInsets? padding;

Review comment (suggestion):
```suggestion
/// `CarouselViewTheme.of(context)`. Instances of [CarouselViewThemeData] can be
```

Code after:
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:ui' show lerpDouble;

import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';

import 'carousel.dart';
import 'material.dart';
import 'theme.dart';

/// Defines default property values for descendant [CarouselView] widgets.
///
/// Descendant widgets obtain the current [CarouselViewThemeData] object using
/// `CarouselViewTheme.of(context)`. Instances of [CarouselViewThemeData] can be
/// customized with [CarouselViewThemeData.copyWith].
///
/// Typically a [CarouselViewThemeData] is specified as part of the overall [Theme]
/// with [ThemeData.carouselViewTheme].
///
/// All [CarouselViewThemeData] properties are `null` by default. When null, the [CarouselView]
/// will provide its own defaults.
///
/// See also:
///
///  * [CarouselViewTheme], an [InheritedWidget] that propagates the theme to its descendants.
///  * [ThemeData], which describes the overall theme information for the application.
@immutable
class CarouselViewThemeData with Diagnosticable {
  /// Creates a theme that can be used for [ThemeData.carouselViewTheme].
  const CarouselViewThemeData({
    this.elevation,
    this.backgroundColor,
    this.overlayColor,
    this.shape,
    this.padding,
  });

  /// The amount of space to surround each carousel item with.
  ///
  /// Overrides the default value for [CarouselView.padding].