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

套件詳情v0.0.7

easy_url_launcher

一個簡單且非常容易使用的 Flutter 套件,用於在您的應用中啟動 URL、電子郵件、電話和簡訊

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
203
喜歡數
40
Pub 分數
140

安裝套件

flutter pub add easy_url_launcher

套件介紹

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

EasyUrlLauncher 是一個輕量級的 Flutter 套件,可簡化在您的應用中啟動 URL、電子郵件、電話通話和簡訊訊息。它提供了一個簡單的 API,可在多個平台(包括 Android、iOS、Web、macOS、Windows 和 Linux)上處理常見的意圖。設計易於使用,可減少樣板程式碼,並確保設備間的一致行為。該套件可輕鬆整合到現有專案中,設定簡單。

適用情境

  • 在瀏覽器中打開網頁連結
  • 直接從應用程式發送電子郵件
  • 發起電話呼叫
  • 發送簡訊訊息
  • 透過原生應用分享內容
  • 啟動外部服務

主要特色

  • 簡單的單行方法呼叫
  • 跨平台相容性
  • 支援 URL、電子郵件、電話和簡訊
  • 最小配置要求
  • 內建錯誤處理
  • 適用於行動裝置、桌面與網頁

適合對象

  • 尋求快速意圖整合的開發者
  • 需要基本共享或通訊功能的應用程式
  • 專案需要最少的依賴項
  • 初學者學習Flutter導航
  • 原型和MVP

使用建議

  • 僅限基本啟動操作
  • 深度連結無自訂
  • 不支援標準協議之外的自訂URL方案
  • 依賴系統級處理程序
  • 不適合複雜的導航流程

原始 README

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

A flutter package based on url_launcher package for call,sms,email and launch url in browser or app with url parameters and launch mode as platform default or platform specific mode for web

Features

  • Very easy to use
  • Support All plateforms

Getting started

Add package to your project by running the follwing command in your terminal

flutter pub add easy_url_launcher

Import pakage

import 'pakage:easy_url_launcher/easy_url_launcher.dart';

Demo

Easy Launcher Demo

Usage

  • You are free to use async & await in your code.
    Column(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              MaterialButton(
                color: Colors.green,
                onPressed: () async {
                  await EasyLauncher.call(number: "767676776");
                },
                child: const Text("Call to a number"),
              ),
              MaterialButton(
                color: Colors.greenAccent,
                onPressed: () async {
                  await EasyLauncher.call(number: "*123#");
                },
                child: const Text("Run a ussd code"),
              ),
              MaterialButton(
                color: Colors.blue,
                onPressed: () async {
                  await EasyLauncher.sms(number: "1010", message: "Hello");
                },
                child: const Text("Send a sms"),
              ),
              MaterialButton(
                color: Colors.indigo,
                textColor: Colors.white,
                onPressed: () async {
                  await EasyLauncher.email(
                      email: "sarwari.developer@gmail.com",
                      subject: "Test",
                      body: "Hello Flutter developer");
                },
                child: const Text("Send an email"),
              ),
              MaterialButton(
                color: Colors.deepPurple,
                textColor: Colors.white,
                onPressed: () async {
                  await EasyLauncher.url(url: "https://pub.dev");
                },
                child: const Text("Open url"),
              ),
              MaterialButton(
                color: Colors.red,
                textColor: Colors.white,
                onPressed: () async {
                  await EasyLauncher.openMap(
                      lati: "36.7032925", long: "67.1891222");
                },
                child: const Text("Open Google map"),
              ),
              MaterialButton(
                color: Colors.pink,
                textColor: Colors.white,
                onPressed: () async {
                  await EasyLauncher.url(
                      url: "https://www.instagram.com/qasim.dev",
                      mode: Mode.platformDefault);
                },
                child: const Text("Open url in default app"),
              ),
               MaterialButton(
                color: Colors.green[700],
                textColor: Colors.white,
                onPressed: () async {
                  await EasyLauncher.sendToWhatsApp(
                      phone: "+93700000000", message: "hi");
                },
                child: const Text("Send to whatsapp"),
              ),
            ],
          ),

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。