Open neiljaywarner opened 2 months ago
I've experienced this myself.
There are other issues that have been opened in the past regarding it https://github.com/VeryGoodOpenSource/very_good_cli/issues/1065, https://github.com/VeryGoodOpenSource/very_good_cli/issues/987 and https://github.com/VeryGoodOpenSource/very_good_cli/issues/973.
@wolfenrain tried providing a fix with https://github.com/VeryGoodOpenSource/very_good_cli/pull/1002, but it seems the issue persists.
I believe this dependency is getting added by Dart tooling since the [template itself](https://github.com/VeryGoodOpenSource/very_good_templates/blob/main/very_good_core/__brick__/%7B%7Bproject_name.snakeCase()%7D%7D/pubspec.yaml) has no reference to it as a dependency in its pubspec.
For now, you can simply resolve by manually removing the flutter_gen
dependency. I'll see if it can get prioritised by the team again. If you would like to provide a fix yourself let us know and we can assign you to the issue 🙌 !
I believe this dependency is getting added by Dart tooling since the [template itself](https://github.com/VeryGoodOpenSource/very_good_templates/blob/main/very_good_core/__brick__/%7B%7Bproject_name.snakeCase()%7D%7D/pubspec.yaml) has no reference to it as a dependency in its pubspec.
This is the main part of the issue. Either we need to work with the Dart team in order to fix this on their end or we need to create a workaround in the mean time.
Description Clash between intl and flutter_gen, imports do not work for app localizations see https://stackoverflow.com/questions/64574620/target-of-uri-doesnt-exist-packageflutter-gen-gen-l10n-gallery-localizations "That was my issue also. Basically the intl package generates localisation code under a fake flutter_gen package, but there is also a real flutter_gen package on pub.dev. If you install the latter, it will take priority and hide the generated localisation code, so it will appear to not exist. – rjh CommentedAug 28, 2022 at 14:04 "
Steps To Reproduce
Expected Behavior project compiles and runs, no dart analysis errors
fixed by remove flutter-gen: any from the pubspec.yaml, flutter pub.geet 5-aug-2024 stable channel, recent/latest cli