Repository: flutter
Issue: [Material3] textStyle property for SegmentedButton does not work
Labels: framework,f: material design,has reproducible steps,P3,team-design,triaged-design,found in release: 3.16,found in release: 3.18

### Steps to reproduce

1. Use the SegmentedButton Widget in the widget tree
2. Use the textStyle property to change the text colours of the SegmentedButtons
3. Run the code in DartPad

### Expected results

The textStyle property should implement the custom text colours

### Actual results

The textStyle property does not implement the custom text colours

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: HomeScreen(),
      ),
    );
  }
}
class HomeScreen extends StatefulWidget {
  const HomeScreen({super.key});

  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  String _artist = "Artist";
  
  @override
  Widget build(BuildContext context) {
    return Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          const Padding(
            padding: EdgeInsets.all(15.0),
            child: Text(
              "WELCOME, user",
              style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: Colors.black),
            ),
          ),
          Padding(
            padding: const EdgeInsets.all(15.0),
            child: SegmentedButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) =>
                    states.contains(MaterialState.selected) ? Colors.blue[900] : Colors.white),
                textStyle: MaterialStateProperty.resolveWith(
                  (Set<MaterialState> states) => states.contains(MaterialState.selected)
                      ? const TextStyle(color: Colors.white)
                      : const TextStyle(color: Colors.black),
                ),
              ),
              segments: const <ButtonSegment<String>>[
                ButtonSegment<String>(
                  value: "Artist",
                  label: Text("Artist"),
                ),
                ButtonSegment<String>(
                  value: "Album",
                  label: Text("Album"),
                ),
                ButtonSegment<String>(
                  value: "Tracks",
                  label: Text("Tracks"),
                ),
                ButtonSegment<String>(
                  value: "Stock",
                  label: Text("Stock"),
                ),
              ],
              selected: <String>{_artist},
              onSelectionChanged: (Set<String> newSelection) {
                setState(() {
                  _artist = newSelection.first;
                });
              },
            ),
          )
        ],
      );
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

<img width="442" alt="Screenshot 2023-12-25 at 10 18 17 PM" src="https://github.com/flutter/flutter/assets/62204476/d2e175d8-b85e-43fa-ad97-d5da1179cbd5">


</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>
NA. I am using DartPad


</details>