Home > Back-end >  Share string message on facebook, twitter, whatsapp using url launcher package flutter
Share string message on facebook, twitter, whatsapp using url launcher package flutter

Time:08-31

How we can share text message for facebook, twitter, whatsapp and instagram? There are social button in app by clicking button it should launch the app accordingly. I can able to launch share via sms on device. I did not got proper resource for launching social app and share it.

CodePudding user response:

you can use share_plus to achieve this :

Share.share('check out my website https://example.com', subject: 'Look what I made!');

CodePudding user response:

import 'package:share_plus/share_plus.dart';

class ShareClass {
  static shareMethod({String message}) {

    Share.share(message);
  }
}

By using this class you can share your test to anywhere on social platform

  • Related