0

I'm building new flutter app, I've downloaded the last version of path_provider package, but when I try to import it using the import statement form the docs

import 'package:path_provider/path_provider.dart';

It didn't work, it says this package doesn't exist, instead I can import things like

import 'package:path_provider_linux/path_provider_linux.dart';

which doens't have the functionality I want.

2
  • did you run flutter pub get? If yes then restart your editor Commented Oct 4, 2020 at 10:29
  • I do all that but nothing works Commented Oct 4, 2020 at 10:29

2 Answers 2

1

Can you build the application? Are you deploying to mobile or MacOS?

Try to run a fresh release configuration, and if it works, then reboot your IDE. Then run the command that Confidence Yobo suggested, to redownload the packages via yaml.

Also make sure that your yaml file is formatted correctly. Once a pubspec GET command has finished running and the lock is released, normally if there is an error it will show up on your output window.

Also make sure to get the latest package: path_provider: ^1.6.18

0

I solved the issue by updating flutter_bloc and bloc packages

Not the answer you're looking for? Browse other questions tagged or ask your own question.