Repository: flutter
Issue: `WidgetStateProperty` stuck on first returned color 
Labels: framework,f: material design,has reproducible steps,P2,team-design,triaged-design,found in release: 3.13,found in release: 3.16

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Write an app that renders a `DataTable` with at least one row.
2. Add a custom theme with `dataTableTheme` with `dataRowColor` having different colors for different states (using `MaterialStateProperty`).
3. Run the app.
4. Focus and/or hover over the row(s).


### Expected results

The row will change color depending on the configured states (focused, hovered etc).

### Actual results

The row remains with the first color that is returned from `MaterialStateProperty.resolveWith`. The row borders, however, change color as expected.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

final ValueNotifier<bool> flag = ValueNotifier(false);

_buildDataCellButton({required bool enabled, required IconData icon}) =>
    DataCell(
      ElevatedButton(onPressed: enabled ? (() {}) : null, child: Icon(icon)),
    );

_buildDataCellDelete({required bool enabled}) => _buildDataCellButton(
      enabled: enabled,
      icon: Icons.delete,
    );

_buildDataCellEdit({required bool enabled}) =>
    _buildDataCellButton(enabled: enabled, icon: Icons.edit);

_buildDataCellText({required String text}) => DataCell(Text(text));

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);

    final borderSide = BorderSide(color: theme.dividerColor);

    return MaterialApp(
      title: "DataTableRow MaterialState test",
      theme: ThemeData.light().copyWith(
        dataTableTheme: DataTableThemeData(
          dataRowColor: MaterialStateProperty.resolveWith(
            (
              states,
            ) {
              if (!flag.value) {
                flag.value = true;

                return Colors.brown.shade100;
              }

              double ratio = 0;

              if (states.contains(MaterialState.hovered)) {
                ratio += 0.25;
              }

              if (states.contains(MaterialState.focused)) {
                ratio += 0.25;
              }

              final color = Color.lerp(
                Colors.blueGrey.shade100,
                Colors.black,
                ratio,
              );

              debugPrint(color.toString());

              return color;
            },
          ),
        ),
      ),
      home: Scaffold(
        appBar: AppBar(),
        body: Center(
          child: DataTable(
            border: TableBorder(
              bottom: borderSide,
              left: borderSide,
              right: borderSide,
              top: borderSide,
            ),
            columns: const [
              DataColumn(label: Text("Description")),
              DataColumn(label: Text("Edit")),
              DataColumn(label: Text("Delete")),
            ],
            rows: [
              DataRow(
                onLongPress: () {},
                cells: [
                  _buildDataCellText(text: "Astrid: NE shared managed"),
                  const DataCell(SizedBox.shrink()),
                  const DataCell(SizedBox.shrink()),
                ],
              ),
              DataRow(
                onLongPress: () {},
                cells: [
                  _buildDataCellText(text: "Cosmo: prod shared ares"),
                  _buildDataCellEdit(enabled: false),
                  _buildDataCellDelete(enabled: false),
                ],
              ),
              DataRow(
                onLongPress: () {},
                cells: [
                  _buildDataCellText(text: "Phoenix: prod shared lyra-lists"),
                  _buildDataCellEdit(enabled: false),
                  _buildDataCellDelete(enabled: true),
                ],
              ),
              DataRow(
                onLongPress: () {},
                cells: [
                  _buildDataCellText(text: "Sirius: NW prod shared locations"),
                  _buildDataCellEdit(enabled: true),
                  _buildDataCellDelete(enabled: false),
                ],
              ),
              DataRow(
                onLongPress: () {},
                cells: [
                  _buildDataCellText(text: "Sirius: prod independent account"),
                  _buildDataCellEdit(enabled: true),
                  _buildDataCellDelete(enabled: true),
                ],
              ),
            ],
          ),
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

Not focused and not hovered
![image](https://github.com/flutter/flutter/assets/23285333/7976da5f-046d-4bc1-a918-141031b7749c)

Hovered
![image](https://github.com/flutter/flutter/assets/23285333/4728b650-2647-40f1-9aeb-be993e7b9ee0)

Focused
![image](https://github.com/flutter/flutter/assets/23285333/fe100e76-8d0f-4824-a3be-7235e796d8d0)

Focused and hovered
![image](https://github.com/flutter/flutter/assets/23285333/5aafba9f-b784-4200-a412-5c2decb2eab5)

</details>


### Logs

<details><summary>Logs</summary>

```console
PS C:\[redacted]\data_table_row_material_state_test> flutter logs
Connected devices:
Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.88
Edge (web)   • edge   • web-javascript • Microsoft Edge 118.0.2088.57
[1]: Chrome (chrome)
[2]: Edge (edge)
Please choose one (or "q" to quit): 1
Showing Instance of 'NoOpDeviceLogReader' logs:
PS C:\[redacted]\data_table_row_material_state_test> 
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
PS C:\[redacted]\data_table_row_material_state_test> flutter doctor -v
[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [Version 10.0.19045.3570], locale pt-BR)
    • Flutter version 3.13.6 on channel stable at C:\[redacted]
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (3 weeks ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at C:\[redacted]\Android\sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = C:\[redacted]\Android\sdk
    • Java binary at: C:\[redacted]\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2022.2)
    • Android Studio at C:\[redacted]\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 17.0.6+0-b2043.56-9586694)

[√] VS Code (version 1.83.1)
    • VS Code at C:\[redacted]\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.74.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.88
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 118.0.2088.57

[√] Network resources
    • All expected network resources are available.

• No issues found!
PS C:\[redacted]\data_table_row_material_state_test> 
```

</details>