Repository: flutter
Issue: LicensePage and LicenseRegistry.licenses have license from dev_dependencies in release
Labels: tool,a: release,has reproducible steps,P2,team-tool,triaged-tool,found in release: 3.22,found in release: 3.23

### Steps to reproduce

Perhaps I am mistaken, but in the release there should not be licenses from the dev_dependencies section.

1.flutter run --release

### Expected results

without license from dev_dependencies 

### Actual results

license from dev_dependencies 

### Code sample

<details open><summary>Code sample</summary>

```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 MaterialApp(
      title: 'Flutter License',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const LicensePage(),
    );
  }
}

```

</details>

<details open><summary>pubspec.yaml</summary>

```
name: test
description: "A new Flutter project."
publish_to: 'none'


version: 1.0.0+1

environment:
  sdk: '>=3.4.3 <4.0.0'

dependencies:
  flutter:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_lints: ^3.0.0

```

</details>


### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.19045.4412], locale ru-RU)
    • Flutter version 3.22.2 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (8 days ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at G:\DB\soft_db\Android\Sdk\
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = G:\DB\soft_db\Android\Sdk\
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2023.3)
    • 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 17.0.10+0--11572160)

[√] VS Code (version 1.90.0)
    • VS Code at C:\Users\ooovid\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

[√] Connected device (3 available)
    • Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64    • Android 9 (API 28) (emulator)
    • Chrome (web)                          • chrome        • web-javascript • Google Chrome 125.0.6422.142
    • Edge (web)                            • edge          • web-javascript • Microsoft Edge 125.0.2535.85

[√] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>