Reputation: 183
I'm trying to use flutter_localizations and I followed this guide
When I save pubspec.yaml on vscode then pub get is ran.
After that vscode can't find app_localizations.dart file.
But this error messages will disappear when I reopen vscode.
Is there anyone with such a problem like me?
Thanks.
Upvotes: 2
Views: 1516
Reputation: 5733
Usually running
flutter gen-l10n
should be enough, however sometimes I'va found myself using
flutter clean && flutter pub get dependencies && flutter packages get
To clean cache, and get the dependencies(which also generate the l10n). 95% of the time the first command should suffice
Upvotes: 2
Reputation: 183
Use this command and Open command palette - command + shift + p
on the vscode.
Type Dart: Restart Analysis Server
and select it.
This error will be gone.
Upvotes: 6