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

Code before:

    final Color? dayForegroundColor = resolve<Color?>(
      (DatePickerThemeData? theme) => theme?.dayForegroundColor,
      states,
    );
    final Color? dayBackgroundColor = resolve<Color?>(
      (DatePickerThemeData? theme) => theme?.dayBackgroundColor,
      states,
    );
    final WidgetStateProperty<Color?> dayOverlayColor = WidgetStateProperty.resolveWith<Color?>(
      (Set<WidgetState> states) => effectiveValue(
        (DatePickerThemeData? theme) => widget.isInRange
            ? theme?.rangeSelectionOverlayColor?.resolve(states)
            : theme?.dayOverlayColor?.resolve(states),
      ),
    );

    final OutlinedBorder dayShape =
        resolve<OutlinedBorder?>((DatePickerThemeData? theme) => theme?.dayShape, states) ??
        const CircleBorder();

    _HighlightPainter? highlightPainter;

    if (widget.isSelectedDayStart || widget.isSelectedDayEnd) {
      // The selected start and end dates get a background highlight
      // matching the day shape, and a contrasting text color.
      itemStyle = itemStyle?.apply(color: dayForegroundColor);
      decoration = ShapeDecoration(color: dayBackgroundColor, shape: dayShape);

      if (widget.isRangeSelected && !widget.isOneDayRange) {
        final _HighlightPainterStyle style = widget.isSelectedDayStart
            ? _HighlightPainterStyle.highlightTrailing
            : _HighlightPainterStyle.highlightLeading;
        highlightPainter = _HighlightPainter(
          color: highlightColor,
          style: style,
          textDirection: textDirection,
        );
      }
    } else if (widget.isInRange) {
      // The days within the range get a light background highlight.
      highlightPainter = _HighlightPainter(
        color: highlightColor,
        style: _HighlightPainterStyle.highlightAll,
        textDirection: textDirection,
      );
      if (widget.isDisabled) {
        itemStyle = itemStyle?.apply(color: colorScheme.onSurface.withOpacity(0.38));
      }
    } else if (widget.isDisabled) {
      itemStyle = itemStyle?.apply(color: colorScheme.onSurface.withOpacity(0.38));

Review comment (suggestion):
```suggestion
      // The selected start and end dates get a custom shaped background
      // highlight, and a contrasting text color.
```

Code after:

    final Color? dayForegroundColor = resolve<Color?>(
      (DatePickerThemeData? theme) => theme?.dayForegroundColor,
      states,
    );
    final Color? dayBackgroundColor = resolve<Color?>(
      (DatePickerThemeData? theme) => theme?.dayBackgroundColor,
      states,
    );
    final WidgetStateProperty<Color?> dayOverlayColor = WidgetStateProperty.resolveWith<Color?>(
      (Set<WidgetState> states) => effectiveValue(
        (DatePickerThemeData? theme) => widget.isInRange
            ? theme?.rangeSelectionOverlayColor?.resolve(states)
            : theme?.dayOverlayColor?.resolve(states),
      ),
    );

    final OutlinedBorder dayShape =
        resolve<OutlinedBorder?>((DatePickerThemeData? theme) => theme?.dayShape, states) ??
        const CircleBorder();

    _HighlightPainter? highlightPainter;

    if (widget.isSelectedDayStart || widget.isSelectedDayEnd) {
      // The selected start and end dates get a custom shaped background
      // highlight, and a contrasting text color.
      itemStyle = itemStyle?.apply(color: dayForegroundColor);
      decoration = ShapeDecoration(color: dayBackgroundColor, shape: dayShape);

      if (widget.isRangeSelected && !widget.isOneDayRange) {
        final _HighlightPainterStyle style = widget.isSelectedDayStart
            ? _HighlightPainterStyle.highlightTrailing
            : _HighlightPainterStyle.highlightLeading;
        highlightPainter = _HighlightPainter(
          color: highlightColor,
          style: style,
          textDirection: textDirection,
        );
      }
    } else if (widget.isInRange) {
      // The days within the range get a light background highlight.
      highlightPainter = _HighlightPainter(
        color: highlightColor,
        style: _HighlightPainterStyle.highlightAll,
        textDirection: textDirection,
      );
      if (widget.isDisabled) {
        itemStyle = itemStyle?.apply(color: colorScheme.onSurface.withOpacity(0.38));
      }
    } else if (widget.isDisabled) {
      itemStyle = itemStyle?.apply(color: colorScheme.onSurface.withOpacity(0.38));