MissingPluginException(No implementation found for method share on channel plugins.flutter.io/share)
Solution 1
i Solve it by remove
flutter app from my device and reinstall
via usb or any other Medium
Solution 2
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
Solution 3
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('&'),
);
Krishna Jangid
Front-end, Back-end & App Developer. ReactJs, NodeJs, NextJs, Flutter and ReactNative
Updated on December 24, 2022Comments
-
Krishna Jangid over 1 year
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>