搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。