Skip to content

[Question]: Share plus (share product) not working native android buildΒ #3714

@krishnadhas-scalgo

Description

@krishnadhas-scalgo

What is your question?

Hi, I implemented the share option in the Flutter module. It works fine when running the Flutter module directly, but when integrated into the native app (in release mode), the following error occurs when clicking the share option. How can I resolve this issue?

share_plus: ^12.0.1

Trying to share link...
2025-11-10 17:48:24.134 24277-24277 flutter com.imedic.patient.utest I πŸ”— Deep link: iMedic://product/simply-herbal-magnesium-citrate-complex-supplement-s330mg-21049442870/43
2025-11-10 17:48:24.134 24277-24277 flutter com.imedic.patient.utest I 🌐 Fallback URL: https://imedic.page.link/product/simply-herbal-magnesium-citrate-complex-supplement-s330mg-21049442870/43
2025-11-10 17:48:24.134 24277-24277 flutter com.imedic.patient.utest I Share intent launched successfully.
2025-11-10 17:48:24.136 24277-24277 flutter com.imedic.patient.utest E [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method share on channel dev.fluttercommunity.plus/share)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:368)

#1 MethodChannelShare.share (package:share_plus_platform_interface/method_channel/method_channel_share.dart:25)

/CODE

void _shareProductLink(BuildContext context, String slug, int id) async {
final deepLink = 'xxxx://product/$slug/$id';
final fallbackUrl = 'https://xxxx.link/product/$slug/$id';
final message = 'Check out this product: $deepLink\nOr visit: $fallbackUrl';

debugPrint(' Trying to share link...');
debugPrint(' Deep link: $deepLink');
debugPrint(' Fallback URL: $fallbackUrl');

try {
  // await Share.share(
  //   message,
  //   subject: 'Awesome Product!',
  // );
  SharePlus.instance.share(
      ShareParams(text: message)
  );
  debugPrint('Share intent launched successfully.');
} catch (error, stackTrace) {
  debugPrint(' Share failed with error: $error');
  debugPrint(' Stack trace: $stackTrace');

  // Optional: show a message in UI
  ScaffoldMessenger.of(context).showSnackBar(
    SnackBar(content: Text('Share failed: $error')),
  );
}

}

Checklist before submitting a question

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I am using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions