Repository: flutter
Issue: showDateRangePicker does not use onPrimary as the header text colour when using a dark theme
Labels: framework,f: material design,f: date/time picker,has reproducible steps,found in release: 2.2,found in release: 2.5,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Create a dark theme app with a light primary colour.
2. Set `onPrimary` in `colorScheme` as a dark colour (to contrast with the light primary colour). 
2. Call `showDateRangePicker`.

**Expected results:**

Date range picker would use `colorScheme.onPrimary` as the text colour in the header to contrast with primary colour used as the background for the header. 

**Actual results:**

Date range picker uses `colorScheme.onSurface` as the text colour for the header, which is invisible on the light primary colour. In fact, it seems to be impossible to get a sensible colour for all parts of the dateRangePicker in this situation, since setting `colorScheme.onSurface` to a dark colour that shows up on the header will also make the text dark on the body of the date range picker. 

This is not the case for light themes, which use `onPrimary` as the header text colour as they're supposed to. 

Setting `colorScheme.onPrimary` to a dark colour:

![image](https://user-images.githubusercontent.com/14959769/128060235-0f826468-7a26-47ef-bd04-143af3a59953.png)

Setting `colorScheme.onSurface` to a dark colour:

![image](https://user-images.githubusercontent.com/14959769/128060453-7934afe3-e4e5-4357-9348-7ea6fc2b3bcb.png)

<details>
  <summary>Logs</summary>
<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.22000.100], locale en-CA)
    • Flutter version 2.2.3 at D:\Portable Programs\flutter
    • Framework revision f4abaa0735 (5 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at D:\Android_SDK
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.3)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.10.31424.327
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.3
    • Flutter plugin version 59.0.4
    • Dart plugin version 212.4746.57

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.100]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 91.0.4472.124
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 92.0.902.55

• No issues found!
```
</details>
<details>
<summary>Code</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        brightness: Brightness.dark,
        primaryColor: Colors.white,
        colorScheme: ColorScheme.dark().copyWith(onPrimary: Colors.black)
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text("Test"),
        ),
        body: Column(children: [ShowDatePickerButton()],),
      ),
    );
  }
}

class ShowDatePickerButton extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialButton(
      onPressed: () {
        showDateRangePicker(
          context: context,
          firstDate: DateTime(2020),
          lastDate: DateTime.now(),
          builder: (context, child) => Column(
            children: [
              Container(
                child: child!,
                constraints: BoxConstraints(maxWidth: 500, maxHeight: 500),
              ),
            ],
            mainAxisAlignment: MainAxisAlignment.center,
          ),
        );
      },
      child: Text("Pick date range"),
    );
  }
}
```
</details>