flutter-intellij
flutter-intellij copied to clipboard
Localization generation doesn't work
When using flutter_localizations and generate: true
, the IDE's 'pub get' clear the generated files, but doesn't generate them. Using flutter pub get
in terminal generates them.
[✓] Flutter (Channel beta, 2.3.0-24.1.pre, on macOS 11.4 20F71 darwin-x64,
locale en-BR)
• Flutter version 2.3.0-24.1.pre at /usr/local/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 615957513e (4 weeks ago), 2021-06-25 09:24:44 -0700
• Engine revision 9d517f475b
• Dart version 2.14.0 (build 2.14.0-188.5.beta)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.3)
• IntelliJ at /Users/bernardoferrari/Applications/JetBrains Toolbox/IntelliJ
IDEA Ultimate.app
• Flutter plugin version 58.0.3
• Dart plugin version 211.7727
@bernaferrari How are you invoking pub get
? When I use the menu Tools > Flutter > Flutter Pub Get
I see that it runs flutter pub get
in the messages pane.
I use this bar
And that one also says it is running flutter pub get
. I don't have an easy answer for that. We'll have to verify that it is doing what it says, and if it is investigate why the Flutter tool does something different.
From the menu it works. Just from pubspec it doesn't.
https://user-images.githubusercontent.com/351125/126394962-e8894f59-6a43-4331-b767-8ffd235e9d1c.mov
Thanks for the recording!
This appears to be a timing issue. I was unable to reproduce it in a runtime workbench, but was able to using Android Studio Bumblebee and Dolphin. It was not consistent, though.
I think what happens is that the analysis server gets updated before flutter pub get
completely finishes. I'm not sure how that could happen, but after a failure the errors go away when the Dart analysis server is restarted.
I'm testing with the "skeleton" sample app.