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

パッケージ詳細v1.0.2

esys_flutter_share

他のアプリケーションと画像およびテキストを共有するためのFlutterプラグイン。

30日間ダウンロード
3310
いいね数
212
Pub ポイント
30

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

flutter pub add esys_flutter_share

パッケージ概要

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

EsysFlutterShare は、ネイティブな共有インテントを介してテキストおよび画像を他のアプリにシームレスに共有できる Flutter プラグインです。Android および iOS の両方でクロスプラットフォーム共有を簡単にし、ユーザーがアプリからソーシャルメディア、メッセージングアプリ、またはメールクライアントにコンテンツを直接送信できるようにします。このプラグインは Flutter エコシステムとスムーズに統合され、最小限のセットアップで済みます。プレーンテキスト、URL、画像ファイルの共有をサポートしており、迅速なコンテンツ配信が必要なアプリに最適です。パッケージは EsysBerlin によってメンテナンスされており、透明性とコミュニティ貢献のために GitHub にホストされています。

用途

  • ソーシャルメディアへのリンク共有
  • アプリから他のアプリへ画像を送信する
  • 共有シートを介してテキストコンテンツを配布する
  • ユーザー生成コンテンツの共有を有効にする
  • メッセージングプラットフォームとの統合

主な機能

  • テキストおよび画像の共有をサポート
  • クロスプラットフォーム互換性
  • 最小限の構成でシンプルな API
  • ネイティブ共有インテントの統合
  • オープンソースで積極的にメンテナンスされています

適している対象

  • ソーシャルメディアアプリ
  • 写真共有アプリケーション
  • コンテンツ発見プラットフォーム
  • ユーザー生成コンテンツの機能
  • 簡単な外部共有を必要とするアプリ

注意事項

  • 一部のデバイスでは、プラットフォーム固有の権限が必要です
  • 基本的な共有機能に制限されています
  • 共有シートの組み込みカスタマイズなし
  • ネイティブOSの共有ダイアログに依存しています
  • 大きな画像ファイルに対して追加の処理が必要になる場合があります

元の README

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

Important Note

We have decided to discontinue the development of this library to concentrate our efforts on other projects. You can use share_plus instead for example.

esys_flutter_share

A Flutter plugin for sharing files & text with other applications.

IMPORTANT Note for iOS

If you are starting a new fresh app, you need to create the Flutter App with flutter create -i swift (see flutter/flutter#13422 (comment)), otherwise, you will get this message:

=== BUILD TARGET flutter_inappbrowser OF PROJECT Pods WITH CONFIGURATION Debug ===
The "Swift Language Version" (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.

If you still have this problem, try to edit iOS Podfile like this (see #15):

target 'Runner' do
  use_frameworks!  # required by simple_permission
  ...
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.0'  # required by simple_permission
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

Instead, if you have already a non-swift project, you can check this issue to solve the problem: Friction adding swift plugin to objective-c project.

Usage

Import:

import 'package:esys_flutter_share/esys_flutter_share.dart';

Share text:

Share.text('my text title', 'This is my text to share with other applications.', 'text/plain');

Share file:

final ByteData bytes = await rootBundle.load('assets/image1.png');
await Share.file('esys image', 'esys.png', bytes.buffer.asUint8List(), 'image/png', text: 'My optional text.');

Share files:

final ByteData bytes1 = await rootBundle.load('assets/image1.png');
final ByteData bytes2 = await rootBundle.load('assets/image2.png');
final ByteData bytes3 = await rootBundle.load('assets/addresses.csv');

await Share.files(
    'esys images',
    {
        'esys.png': bytes1.buffer.asUint8List(),
        'bluedan.png': bytes2.buffer.asUint8List(),
        'addresses.csv': bytes3.buffer.asUint8List(),
    },
    '*/*',
    text: 'My optional text.');

Share file from url:

var request = await HttpClient().getUrl(Uri.parse('https://shop.esys.eu/media/image/6f/8f/af/amlog_transport-berwachung.jpg'));
var response = await request.close();
Uint8List bytes = await consolidateHttpClientResponseBytes(response);
await Share.file('ESYS AMLOG', 'amlog.jpg', bytes, 'image/jpg');

Check out the example app in the Repository for further information.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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