Repository: flutter
Issue: Coverage isn't reported for projects with multiple modules 
Labels: a: tests,c: new feature,tool,has reproducible steps,P3,team-tool,triaged-tool,found in release: 3.16,found in release: 3.18

### Steps to reproduce

I have a Flutter project structure like this:
```
Flutter Project
   - pubspec.yaml
   - test
   - feature1 (modular project)/
             - pubspec.yaml
             - test
   - feature2 (modular project)/
             - pubspec.yaml
             - test
   - feature3 (modular project)/
             - pubspec.yaml
             - test
 ```
After I ran the commands of the root Flutter Project:
```
flutter test --coverage feature1 feature2 feature3
```

The result's showed as below:
![Screenshot 2566-12-27 at 14 13 11](https://github.com/flutter/flutter/assets/62892558/6456b926-3366-45d7-b4fd-3e51c8e297cc)


but the lcov.info file's generated which has empty result:
![Screenshot 2566-12-27 at 14 15 41](https://github.com/flutter/flutter/assets/62892558/2b3daeb4-6548-4330-9475-e3dcd122a82b)


More Information
•
```
Flutter SDK Version: 3.16.5 
```
• When I tried to test coverage in each module (feature1, feature2, feature3) -> the lcov.info files were generated which had results in coverage/lcov.info of each module, but I would like all results which are merged or generated in the root project.  

### Expected results

lcov.info file should have the results after run test coverage 

** I would like all results which are merged and generated in the root project (coverage/lcov.info).

### Actual results

The lcov.info file's generated which has empty result

### Code sample

<details open><summary>Code sample</summary>

```dart
STEP 1: checkout this repo
https://github.com/PearlDroidOs/flutter-test-issue
     Note: 
        - This repo is a template which's created for this report only.

STEP 2: run this command
flutter test --coverage feature1 feature2 feature3

STEP 3: see the result issue at coverage/lcov.info file
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

 **In Steps to reproduce**

</details>


### Logs

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


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.16.5, on macOS 14.2.1 23C71 darwin-arm64, locale en-TH)
    • Flutter version 3.16.5 on channel stable at /Users/{username}/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78666c8dc5 (7 days ago), 2023-12-19 16:14:14 -0800
    • Engine revision 3f3e560236
    • Dart version 3.2.3
    • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/{username}/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/{username}/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C65
    • CocoaPods version 1.13.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • 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.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Community Edition (version 2023.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 76.1.4
    • Dart plugin version 232.10072.19

[✓] VS Code (version 1.85.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • macOS (desktop)           • macos         • darwin-arm64   • macOS 14.2.1 23C71 darwin-arm64
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 120.0.6099.129

[✓] Network resources
    • All expected network resources are available.

• No issues found!

```

</details>