I\'ve just setup my Macbook for flutter development,
So I downloaded flutter sdk, and placed it in my Documents. After, I setup my path variable to
When you usually get this error message:
Target of URI doesn't exist: 'package:foo'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist.
Example:
Target of URI doesn't exist: 'package:random_string/random_string.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist.
import 'package:random_string/random_string.dart';
It is because a dependency is missing.
So all you have to do is find out what packages are needed by googling your package name.
Install the dependency:
$ flutter pub get
and add the dependency in the pubspec.yaml file: