Repository: flutter
Issue: CupertinoButton's child text does not apply primaryContrastingColor anymore
Labels: framework,f: cupertino,has reproducible steps,P2,team-design,triaged-design,found in release: 3.27,found in release: 3.28

### Steps to reproduce

1. Create a CupertinoApp with default values.
2. Place a CupertinoButton with a custom background color, for example: CupertinoColors.systemPurple.
3. Check out the text's color.

### Expected results

The text on the button should use primaryContrastingColor, its white by default

### Actual results


The text of the `CupertinoButton` does not apply `primaryContrastingColor` and instead uses `primaryColor`.

**Why it should be fixed:**
1. This is a breaking change and is not easy to address in a production app after the Flutter 3.27 upgrade.
2. There is no `color:` argument in the `CupertinoButton.filled` constructor, and it only applies `primaryColor`.
3. Consequently, there is no straightforward way to create a purple `CupertinoButton` with white text.

**How it can be fixed:**
- Restore the default behavior for `CupertinoButton`.
- Alternatively, add a `color` argument to the `CupertinoButton.filled` constructor.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      home: MyHomePage(title: 'Test'),
      supportedLocales: const [Locale('en')],
      localizationsDelegates: const [
        DefaultMaterialLocalizations.delegate,
        DefaultCupertinoLocalizations.delegate,
        DefaultWidgetsLocalizations.delegate,
      ],
      locale: const Locale('en'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            CupertinoButton(
              color: CupertinoColors.systemPurple,
              child: Text('Click Me'),
              onPressed: () {
                print('Test');
              },
            ),
          ],
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Flutter 3.24 screenshot</summary>

![Image](https://github.com/user-attachments/assets/0e76ffec-935b-4215-9bfa-fc93f2412351)


</details>

<details open>
<summary>Flutter 3.27 screenshot</summary>


![Image](https://github.com/user-attachments/assets/8efa434d-cc98-4315-a9fc-7239b8c62a37)

</details>


### Logs




### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.27.1, on macOS 15.1.1 24B91 darwin-arm64, locale en-RU)
    • Flutter version 3.27.1 on channel stable at /Users/jack/Applications/fvm/versions/3.27.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (4 weeks ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/me/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.15.0

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.96.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (4 available)
    • iPhone 13 mini 18.1 (mobile)    • 011A6845-5B18-4765-AEDA-216A8A873621 • ios          • com.apple.CoreSimulator.SimRuntime.iOS-18-1 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64 • macOS 15.1.1 24B91 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin       • macOS 15.1.1 24B91 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>