question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Analyzer doesn't detect changes in l10n Flutter tool.

See original GitHub issue

Describe 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:

  1. 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:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
DanTupcommented, Mar 14, 2022

@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 tag 2.17.0-20.0.dev.

2reactions
DanTupcommented, Jan 25, 2021

I’ve updated https://dart-review.googlesource.com/c/sdk/+/179776 to only handle .dart_tool (I’m not aware of any dot-folders package:build writes to outside of that, but more can be added if that’s not true).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found