I’m starting out with Dart and Flutter and wanted to import this library into a project on AndroidStudio: https://pub.dev/packages/translator/install
I ran this command in the terminal:
$ flutter pub add translator
Then I wrote this line in the code:
import ‘package: translator / translator.dart’;
but it gives me this error: Target of URI doesn’t exist:
‘package: language_tool / language_tool.dart’.
Anyone know how I can fix it? Thank you 🙂
>Solution :
First restart your IDE , if does not work than do this commands.
This worked for me in VS Code. I only had to run these lines in my terminal/command prompt and problem was solved.
flutter packages get
Optionally you also run.
flutter upgrade