appinio_social_share_plus 0.4.1 copy "appinio_social_share_plus: ^0.4.1" to clipboard
appinio_social_share_plus: ^0.4.1 copied to clipboard

Supports sharing text, images, files and text with image to social media (Facebook, Instagram, Instagram Story, Messenger, Telegram, WhatsApp, Twitter, Tiktok, SMS, System, etc.).

example/lib/main.dart

import 'package:appinio_social_share_plus/appinio_social_share_plus.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  AppinioSocialSharePlus appinioSocialShare = AppinioSocialSharePlus();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: "Share Feature",
        home: Scaffold(
          body: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                child: const Text("ShareToWhatsapp"),
                onPressed: () async {
                  FilePickerResult? result = await FilePicker.platform
                      .pickFiles(type: FileType.image, allowMultiple: false);
                  if (result != null && result.paths.isNotEmpty) {
                    shareToWhatsApp("message", result.paths[0]!);
                  }
                },
              ),
            ],
          ),
        ));
  }

  shareToWhatsApp(String message, String filePath) async {
    await appinioSocialShare.android.shareToSMS(message, filePath);
  }

  shareToInstagramStory(String appId, String message, String filePath) async {
    await appinioSocialShare.android
        .shareToInstagramStory(appId, stickerImage: filePath, message: message);
  }

  shareToFacebookStory(String appId, String filePath) async {
    await appinioSocialShare.android
        .shareToInstagramStory(appId, stickerImage: filePath);
  }
}
2
likes
150
points
261
downloads

Publisher

unverified uploader

Weekly Downloads

Supports sharing text, images, files and text with image to social media (Facebook, Instagram, Instagram Story, Messenger, Telegram, WhatsApp, Twitter, Tiktok, SMS, System, etc.).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, html2md, plugin_platform_interface

More

Packages that depend on appinio_social_share_plus

Packages that implement appinio_social_share_plus