4
votes

I followed the instructions from https://pub.dartlang.org/packages/share, adding the dependency running flutter packages get, but I can't import the plugin in my Dart code. I get the following error:

Target of URI doesn't exist: 'package:share/share.dart'.

I tried it a few times, so it's neither a typo nor a singe time bug.

Is this a known bug? And is there any fix for that?

Otherwise is there a different way of sharing simple urls and text pieces in Flutter?

1
Have you used "Packages get"? - creativecreatorormaybenot
You could also try to Invalidate caches and restart if you are using Android Studio/IntelliJ. flutter clean may also work. - Bostrot

1 Answers

2
votes

Invalidate caches and restart did work, thanks for the help!