fluttertpc_flutter_sms:基于 Flutter 生态的短信发送插件项目

快速集成 SMS/MMS 发送功能,支持单发、群发和直接发送,可填充收件人与内容,适用于 Android 和 iOS,兼容 iMessage,提升社交类应用开发效率。【此简介由AI生成】

分支3Tags3
文件最后提交记录最后更新时间
5 个月前
4 年前
3 年前
1 年前
6 年前
4 年前
2 年前
7 年前
6 年前
7 年前
2 年前
7 年前
1 个月前
4 年前
1 年前
7 年前
4 个月前
1 个月前
1 个月前
1 年前
4 年前
3 个月前
5 个月前
6 年前
2 年前

Flutter Community: flutter_sms

Buy Me A Coffee Donate github pages GitHub stars flutter_sms

flutter_sms

alt-text-1

Online Demo: https://fluttercommunity.github.io/flutter_sms/

Description

Flutter Plugin for sending SMS and MMS on Android and iOS. If you send to more than one person it will send as MMS. On the iOS if the number is an iPhone and iMessage is enabled it will send as an iMessage.

How To Use

You can send multiple ways:

  1. Message and No People
  2. People and No Message
  3. Message and People

This will populate the correct fields.

Example

Make sure to Install and Import the Package.

import 'package:flutter_sms/flutter_sms.dart';

Create a function for sending messages.

void _sendSMS(String message, List<String> recipents) async {
 String _result = await sendSMS(message: message, recipients: recipents)
        .catchError((onError) {
      print(onError);
    });
print(_result);
}

You can quickly send the message with this function.

String message = "This is a test message!";
List<String> recipents = ["1234567890", "5556787676"];

_sendSMS(message, recipents);

Sending Direct

WARNING, there is a narrow category of apps that can get into the play store using this feature. Using it is only advisable if you fit into this category or you intent to distribute through a third party platform

On Android, you can skip the additional dialog with the sendDirect parameter.

String message = "This is a test message!";
List<String> recipents = ["1234567890", "5556787676"];

 String _result = await sendSMS(message: message, recipients: recipents, sendDirect: true)
        .catchError((onError) {
      print(onError);
    });
print(_result);

NOTE: This also requires the SEND_SMS permission to be added to the AndroidManifest.xml

    <uses-permission android:name="android.permission.SEND_SMS"/>
    
    <application
      ...

Screenshots

iOS SMS Android MMS
alt-text-1 alt-text-2

You can find other screenshots here.

项目介绍

快速集成 SMS/MMS 发送功能,支持单发、群发和直接发送,可填充收件人与内容,适用于 Android 和 iOS,兼容 iMessage,提升社交类应用开发效率。【此简介由AI生成】

定制我的领域