Repository: flutter
Issue: [gen_l10n] ` flutter gen-l10n` doesn't work with default `synthetic-package` value
Labels: tool,a: internationalization,has reproducible steps,P2,team-tool,triaged-tool,found in release: 3.22,found in release: 3.23

### Steps to reproduce

Create a new arb key
save
run flutter gen-l10n

### Expected results

New arbkey to be added to app_localization

### Actual results

Nothing, No error message, but it does not create the keys either. 

### Code sample

<details open><summary>app_localizations.dart</summary>

```dart
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';

class AppLocalizations {
  AppLocalizations(this.locale);

  final Locale locale;

  static AppLocalizations of(BuildContext context) {
    return Localizations.of<AppLocalizations>(context, AppLocalizations)!;
  }

  static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate();

  static final Map<String, Map<String, String>> _localizedValues = {
    'en': {
      'appName': 'Fairy VAP tool',
      'checkVap': 'Check VAP',
      'createVap': 'Create VAP',
      'settings': 'Settings',
    },
    'es': {
      'appName': 'Herramienta Fairy VAP',
      'checkVap': 'Comprobar VAP',
      'createVap': 'Crear VAP',
      'settings': 'Ajustes',
    },
  };

  String get appName {
    return _localizedValues[locale.languageCode]!['appName']!;
  }

  String get checkVap {
    return _localizedValues[locale.languageCode]!['checkVap']!;
  }

  String get createVap {
    return _localizedValues[locale.languageCode]!['createVap']!;
  }

  String get settings {
    return _localizedValues[locale.languageCode]!['settings']!;
  }
}

class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
  const _AppLocalizationsDelegate();

  @override
  bool isSupported(Locale locale) {
    return ['en', 'es'].contains(locale.languageCode);
  }

  @override
  Future<AppLocalizations> load(Locale locale) {
    return SynchronousFuture<AppLocalizations>(AppLocalizations(locale));
  }

  @override
  bool shouldReload(_AppLocalizationsDelegate old) => false;
}
```

</details>

<details open><summary>pubspec.yaml</summary>

```yaml
environment:
  sdk: '>=3.4.1 <4.0.0'
dependencies:
  flutter:
    sdk: flutter
  shared_preferences: ^2.0.15
  flutter_localizations:
    sdk: flutter
  intl: ^0.19.0
flutter_intl: 
  enabled: true
  cupertino_icons: ^1.0.6

dev_dependencies:
  flutter_test:
    sdk: flutter
  intl_translation: ^0.20.0
  flutter_lints: ^4.0.0

flutter:
  uses-material-design: true
  generate: true
```

</details>

</details>

<details open><summary>app_en.arb</summary>

```json
{
	"@@locale": "en",
	"appName": "Fairy VAP tool",
	"@appName": {},
	"checkVap": "Check VAP",
	"@checkVap": {},
	"createVap": "Create VAP",
	"@createVap": {},
	"settings": "Settings",
	"@settings": {},
	"thememode": "Theme Mode",
	"@thememode": {}
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>
Not applicable
</details>


### Logs

<details open><summary>Logs (flutter --verbose gen-l10n)</summary>

```console
[ +265 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +8 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +130 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[   +4 ms] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +521 ms] "flutter gen-l10n" took 705ms.
[ +351 ms] ensureAnalyticsSent: 261ms
[        ] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[  +35 ms] exiting with code 0
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Versión 10.0.26200.5001], locale es-MX)
    • Flutter version 3.22.2 on channel stable at C:\Apps\Desarrollo\Flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (3 weeks 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 35.0.0-rc4)
    • Android SDK at C:\Users\mauro\AppData\Local\Android\sdk
    • Platform android-32, build-tools 35.0.0-rc4
    • 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.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.10.35013.160
    • Windows 10 SDK version 10.0.22621.0

[√] 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.2)
    • VS Code at C:\Users\mauro\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.90.0

[√] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Versión 10.0.26200.5001]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 127.0.2651.8

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>