0

I'm a beginner in flutter, I want to use SQLite database using sqflite package in my Flutter App,

when I use import 'package:path_provider/path_provider.dart';I have a compilation error saying Target of URI doesn't exist: 'package:path_provider/path_provider.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist. and when I use io.Directory documentDirectory = await getApplicationDocumentsDirectory(); I have a compilation error saying

Try correcting the name to the name of an existing method, or defining a method named 'getApplicationDocumentsDirectory'.```

1 Answer 1

0

Looks like you need to add path_provider dependency to your pubspec.yaml.

Add this:

dependencies:
  ...
  path_provider: ^2.0.11

Then run

flutter pub get

More info: https://pub.dev/packages/path_provider

Sign up to request clarification or add additional context in comments.

1 Comment

or simply run flutter pub add path_provider cmd in the terminal :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.