Template version: v0.0.1
flutter_sms
This project is based on flutter_sms.
1. Installation and Usage
1.1 Installation
Go to the project directory and add the following dependencies in pubspec.yaml
pubspec.yaml
...
dependencies:
flutter_sms:
git:
url: https://gitcode.com/CPF-Flutter/fluttertpc_flutter_sms.git
# ref: 2.3.3-ohos-1.0.0
ref: TAG # Please select the TAG to the TAG Version Mapping
...
Execute Command
flutter pub get
TAG Version Mapping
| Flutter Framework Version | TAG | Branch |
|---|---|---|
| 3.7 | 2.3.3-ohos-1.0.0 | master |
| 3.22 | 2.3.3-ohos-1.0.0 | master |
| 3.27 | 2.3.3-ohos-1.0.0 | master |
| 3.35 | 2.3.3-ohos-1.0.0 | master |
1.2 Usage
For use cases ohos/example
2. Constraints
2.1 Compatibility
This document is verified based on the following versions:
- 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;
- 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;
- Flutter: 3.27.5-ohos-1.0.1; SDK: 5.0.0(12); IDE: DevEco Studio: 5.0.13.200; ROM: 5.1.0.120 SP3;
- Flutter: 3.35.8-ohos-0.0.1; SDK: 6.0.1(21); IDE: DevEco Studio: 6.0.1.260; ROM: 6.0.0.120 SP6;
3. API
If the value of **ohos Support** is **yes**, it means that the ohos platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or 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. Known Issues
5. Others
6. License
This project is licensed under The MIT License (MIT).