README.OpenHarmony_CN.md 2.36 KB

模板版本: v0.0.1

flutter_sms

本项目基于 flutter_sms 开发。

1. 安装与使用

1.1 安装方式

进入到工程目录并在 pubspec.yaml 中添加以下依赖:

pubspec.yaml

...

dependencies:
  flutter_sms:
    git:
      url: https://gitcode.com/openharmony-sig/fluttertpc_flutter_sms.git
...

执行命令

flutter pub get

1.2 使用案例

使用案例详见 ohos/example

2. 约束与限制

2.1 兼容性

在以下版本中已测试通过

  1. Flutter: 3.7.12-ohos-1.0.6; SDK: 5.0.0(12); IDE: DevEco Studio: 5.0.13.200; ROM: 5.1.0.120 SP3;
  2. Flutter: 3.22.1-ohos-1.0.1; SDK: 5.0.0(12); IDE: DevEco Studio: 5.0.13.200; ROM: 5.1.0.120 SP3;

3. API

[!TIP] "ohos Support"列为 yes 表示 ohos 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。

Name Description Type Input Output ohos Support
sendSMS Open SMS Dialog on ohos fuction {required String message,required List recipients,bool sendDirect = false} Future yes
launchSms Launch SMS Url Scheme for single recipien fuction {String? message,String? number} Future yes
launchSmsMulti Launch SMS Url Scheme for multiple recipients function {required String message,required List numbers} Future yes
canSendSMS Check if you can send SMS on this platform fuction / Future yes

4. 遗留问题

5. 其他

6. 开源协议

本项目基于 The MIT License (MIT) ,请自由地享受和参与开源。