搜尋套件、儲存庫與 APP 分類

套件詳情v4.0.0

open_share_plus

用於將內容分享至社群媒體的 Flutter 插件。您可以使用它分享至郵件、電話、WhatsApp 和系統共享介面。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
538
喜歡數
24
Pub 分數
160

安裝套件

flutter pub add open_share_plus

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

open_share_plus 是一個 Flutter 插件,可實現跨多個平台(包括 Android、iOS、Web、macOS、Windows 和 Linux)的內容無縫分享。它支援向各種應用程式(如郵件、電話、WhatsApp 以及系統的預設分享介面)分享內容。此插件設計簡潔且具有廣泛相容性,讓開發者能以最少設定整合原生分享功能。該插件利用各平台特定的 API,確保在不同裝置上行為一致。

適用情境

  • 透過 WhatsApp 分享文字或連結
  • 從應用程式內發送電子郵件
  • 在行動和桌面裝置上整合系統分享對話框
  • 在社交應用中快速共享內容
  • 在跨平台應用中提供通用的共享選項

主要特色

  • 支援多個平台,包括網頁和桌面
  • 與 WhatsApp、郵件和電話的原生整合
  • 用於分享文字、URL 和檔案的簡單 API
  • 使用系統共享UI以獲得一致的使用者體驗
  • 跨平台相容性,設定最少

適合對象

  • 需要多平台共享的應用程式
  • 社群媒體整合
  • 電子郵件和訊息功能
  • 面向使用者的內容共享工具
  • 尋求易用共享解決方案的開發者

使用建議

  • 某些系統需要特定平台的權限
  • 分享表單 UI 的自定義有限
  • 依賴外部應用程式已安裝(例如 WhatsApp)
  • 可能在不同作業系統版本中表現不同
  • 檔案分享需要在每個平台正確處理檔案路徑

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

open_share_plus

Flutter Plugin for sharing contents to social media.You can use it share to Mail, WhatsApp And System Share UI

Using

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile and web development, and a full API reference.

Installation

First, add open_share_plus as a dependency in your pubspec.yaml file.

In your flutter project add the dependency:

dependencies:
  ...
  open_share_plus:

For help getting started with Flutter, view the online documentation.

Setup Configuration

  • Please check if use open localFile {support iOS(DocumentInteraction) / android(intent) / PC(ffi) / web(dart:html)} open_filex.
  • Please check if use open browser, phone, mail and whatsapp url_launcher.

Example

Please follow this example here.

Browser
Open.browser(url: "https://datadirr.com")
Phone Dial
Open.phone(phoneNumber: "+919726428397")
Mail
Open.mail(toAddress: "datadirr@gmail.com", subject: "datadirr", body: "datadirr dev")
WhatsApp (whatsAppNumber with country code)
Open.whatsApp(whatsAppNumber: "919876543210", text: "datadirr")
Local File (Only ANDROID, IOS)
Open.localFile(filePath: localFilePath)

所屬分類

依賴

依賴清單 4 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。