パッケージ、リポジトリ、アプリカテゴリを検索

share_social_network のカバー
パッケージ詳細v1.2.9

share_social_network

幅広い共有方法を提供する完成済みのプラットフォームです。特定の人気アプリケーションに直接アクセスを提供するか、組み込みのデフォルト共有機能を使用して共有する必要があります。

AndroidiOS
30日間ダウンロード
16
いいね数
26
Pub ポイント
105

パッケージをインストール

flutter pub add share_social_network

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

share_social_network パッケージは、Flutter アプリに共有機能を簡単に統合する方法を提供し、ユーザーが人気のあるソーシャルプラットフォームを通じてコンテンツを共有したり、システムのデフォルトの共有オプションを使用できるようにします。Android および iOS でのネイティブ共有インテントへのアクセスプロセスを簡素化し、ボイラープレートコードを減らします。開発者は最小限の構成で共有を簡単にトリガーでき、アプリ固有の共有と汎用的なシステムレベルの共有の両方をサポートしています。このパッケージは、複雑なセットアップなしに迅速かつ信頼性の高い共有機能が必要なアプリに最適です。

用途

  • ソーシャルメディアアプリ内でリンクやテキストを共有する
  • ユーザー生成コンテンツの配信を有効化する
  • デフォルトのシステム共有ダイアログの統合
  • クロスプラットフォーム共有ワークフローのサポート
  • アプリUIに共有ボタンを追加する

主な機能

  • Flutter との簡単な統合
  • Android および iOS のサポート
  • 人気のソーシャルアプリへの直接アクセス
  • システムのデフォルト共有に切り替えます
  • 最小構成が必要

適している対象

  • 基本的な共有機能を必要とするアプリ
  • 迅速な共有実装を求める開発者
  • クロスプラットフォームモバイルアプリケーション
  • ソーシャルメディア統合
  • コンテンツ共有プラットフォーム

注意事項

  • 共有インターフェースのカスタマイズが限定的
  • デバイスにインストールされたソーシャルアプリに依存します
  • 共有用の組み込み分析なし
  • 一部のプラットフォームでは適切な権限が必要です
  • すべてのニッチなソーシャルネットワークをサポートしない可能性があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Share Social Network

pub package

A ready-made platform that provides a wide range of ways to share, you will need to provide access directly to certain popular applications or just share using the built-in default sharing.

Platforms

Works on both platforms Android and iOS

Image Image Image
Video Photo Video

Initial settings

Android Configuration
Paste the following attribute in the AndroidManifest.xml tag in the android/app/src/main/AndroidManifest.xml:
 		`xmlns:tools="http://schemas.android.com/tools"`
For example:
        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:tools="http://schemas.android.com/tools"
         package...
Create a xml file named filepaths.xml in the app/src/main/res/xml folder and paste this code in the file :
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <cache-path name="image" path="/"/>
</paths>
Add this code snippet to the very bottom manifest/application in the android/app/src/main/AndroidManifest.xml insert after meta-data:
 		     <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.com.weeidl.share_social_network"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/filepaths" />
        </provider>
iOS Configuration
Add this to your Info.plist to use share on instagram and facebook story
<key>LSApplicationQueriesSchemes</key>
	<array>
	<string>instagram-stories</string>
	<string>facebook-stories</string>
	<string>facebook</string>
	<string>instagram</string>
	<string>twitter</string>
	<string>whatsapp</string>
 <string>tg</string>
	</array>
Add this if you are using share on facebook. For this you have to create an app on https://developers.facebook.com/ and get the App ID
<key>FacebookAppID</key>
<string>xxxxxxxxxxxxxxx</string>

Getting Started

Add the package to your pubspec.yaml:

   share_social_network: ^1.2.9

In your dart file, import the library:

    import 'package:share_social_network/share_social_network.dart';

Instead of using a ShareSocialNetwork use ShareSocialNetwork.show Widget:

  ShareSocialNetwork.show(
    context: context,
    backgroundColor: Colors.white,
    pillColor: Colors.black12,
    transitionDuration: Duration(milliseconds: 300),
    screenshotController: screenshotController,
    copyToClipboard: "https://github.com/weeidl/share_social...",
    telegram: Telegram(
      content: "Hello World \n https://github.com/weeidl",
    ),
    instagram: Instagram(
      backgroundBottomColor: "#FF7391",
      backgroundTopColor: "#591E78",
      attributionURL: "https://deep-link-url",
      imagePath: imagePath,
    ),
    facebook: Facebook(
      backgroundTopColor: "#ffffff",
      attributionURL: "https://github.com/weeidl",
      backgroundBottomColor: "#000000",
      imagePath: imagePath,
      appId: "xxxxxxxxxxxxx",
    ),
    more: More(
      message: 'Hello World \n https://github.com/weeidl',
    ),
    twitter: Twitter(
      captionText: 'Share twitter',
      hashtags: ["hello", "world", "weeild", "artur"],
      url: 'https://github.com/weeidl',
      trailingText: " \nweeidl",
    ),
    whatsapp: Whatsapp(
      content: 'Hello World \n https://github.com/weeidl',
    ),
  );
 }
Example:

Example of how to send something to instagram:

ScreenshotController screenshotController = ScreenshotController();
void shareSocialNetwork(BuildContext context) async {
  String imagePath = await screenshotController.capture().then((image) async {
    final directory = await getApplicationDocumentsDirectory();
    final file = await File('${directory.path}/temp.png').create();
    await file.writeAsBytes(image!);
    return file.path;
  });
  ShareSocialNetwork.show(
    context: context,
    backgroundColor: Colors.white,
    pillColor: Colors.black12,
    transitionDuration: Duration(milliseconds: 300),
    screenshotController: screenshotController,
    copyToClipboard: "https://github.com/weeidl/share_social...",
    instagram: Instagram(
      backgroundBottomColor: "#FF7391",
      backgroundTopColor: "#591E78",
      attributionURL: "https://deep-link-url",
      imagePath: imagePath,
    ),
  );
}
Follow Me:

instagram Telegram LinkedIn GitHub

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。