Analyzer doesn't detect changes in l10n Flutter tool.
See original GitHub issueDescribe the bug https://flutter.dev/docs/development/accessibility-and-localization/internationalization
In Flutter 1.22, a new tool for generating translations was released. This tool generates a synthetic package in the root
.dart_tool/flutter_gen/l10n_gen
and updates the code when flutter run
is running and the arb template file changes .
But the new code generated inside that package is not reanalyzed and saw an error like if the methods inside the package don’t exists. Once the file .dart_tool/flutter_gen/l10n_gen/app_localizations.dart
is opened the error disapears.
To Reproduce Steps to reproduce the behavior:
- Follow the steps at https://flutter.dev/docs/development/accessibility-and-localization/internationalization
Screenshots If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- VS Code version: 1.52.1
- Dart extension version: 3.18.1
- Dart/Flutter SDK version: Channel dev, 1.26.0-8.0.pre, on macOS 11.1 20C69 darwin-x64, locale es-E
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Target of URI doesn't exist: 'package:flutter_gen/gen_l10n ...
I followed the Flutter official doc (https://flutter.dev/docs/development/accessibility-and-localization/internationalization) but came ...
Read more >The Flutter command-line tool
Command Example of use More information
assemble flutter assemble ‑o Assemble and build flutter resources.
attach flutter attach ‑d Attach to a running application.
build flutter...
Read more >Flutter Internationalization done right | by Harshvardhan Shinde
In this article, we learned how easy it is to internationalize and localize our Flutter apps with the help of the new localization...
Read more >Internationalizing and Localizing your Flutter App
Guide on internationalizing and localizing a Flutter App. Follow our series and learn how to develop your first app with Flutter.
Read more >flutter_translation_sheet | Dart Package - Pub.dev
Flutter Translation Sheet (fts) is a simple tool to help you with localization (l10n), using automatic GoogleSheet translations via Google Translate, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@orestesgaolin the fix above should have shipped in stable releases quite some time ago, but perhaps you’re still seeing #3438? The fix for that was in the Dart SDK, but looks like it wasn’t in v2.16 (the current stable), so I’d expect it to be in the next major Dart/Flutter release.
I think it’s probably already in the Flutter beta channel, as that reports
2.17.0-69.2.beta
for the Dart SDK and the commit above includes the tag2.17.0-20.0.dev
.I’ve updated https://dart-review.googlesource.com/c/sdk/+/179776 to only handle
.dart_tool
(I’m not aware of any dot-folderspackage:build
writes to outside of that, but more can be added if that’s not true).