Reputation: 5410
i found error when i use flutter_share: ^1.0.2+1
MissingPluginException(No implementation found for method share on channel plugins.flutter.io/share)
E/flutter ( 3361): MissingPluginException(No implementation found for method share on channel plugins.flutter.io/share)
E/flutter ( 3361): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:278:7)
E/flutter ( 3361): <asynchronous suspension>
E/flutter ( 3361): #1 Share.share (package:share/share.dart:44:20)
E/flutter ( 3361): #2 SignalCard.build.<anonymous closure>
Upvotes: 11
Views: 12495
Reputation: 11
As already, described above. Close your debugging state, and restart it. I can see some repositories to downloading [in verbose mode], It might download repositories from cloud and needs to rebuild whole application from the start.
Upvotes: 0
Reputation: 6135
NOTE: flutter_share
and share
packages have discontinued.
Now I am using official share_plus
plugin, you can find it at
https://pub.dev/packages/share_plus
I hope, this will solve your issue. Thanks.
Upvotes: 2
Reputation: 1231
When you add a plugin to your app which contains native code you have to restart the app in order to be loaded. So hot restart etc. is not enough.
Upvotes: 2
Reputation: 113
If you use share plugin in web project, this error will appear permanently. As write here, you must use share_plus plugin
But this plugin (share_plus), can't share files
/// Share files
@override
Future<void> shareFiles(
List<String> paths, {
List<String>? mimeTypes,
String? subject,
String? text,
Rect? sharePositionOrigin,
}) {
throw UnimplementedError('shareFiles() has not been implemented on Web.');
}
And share message (text + subject) only by mail
// see https://github.com/dart-lang/sdk/issues/43838#issuecomment-823551891
final uri = Uri(
scheme: 'mailto',
query: queryParameters.entries
.map((e) =>
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value)}')
.join('&'),
);
Upvotes: 2
Reputation: 9830
The share plugin works as intended. The error probably appears because the addition of the plugin was followed by hot restart or hot reload rather than full restart. This means the plugin's platform-specific code is not built into the app.
Work around: stop the app and restart it after adding a plugin.
source: https://github.com/flutter/website/pull/1038
Upvotes: 14
Reputation: 5410
i Solve it by remove
flutter app from my device and reinstall
via usb or any other Medium
Upvotes: 23