feat: send sms direct

master
UC-HOBA 4 years ago
parent 56882043b6
commit 7535ee643e
  1. 6
      lib/main.dart
  2. 10
      pubspec.lock
  3. 10
      pubspec.yaml

@ -26,8 +26,9 @@ class AnalyzeViewState extends State<AnalyzeView>
);
void _sendSMS(String message, List<String> recipents) async {
String _result = await sendSMS(message: message, recipients: recipents)
.catchError((onError) {
String _result =
await sendSMS(message: message, recipients: recipents, sendDirect: true)
.catchError((onError) {
if (kDebugMode) {
print('sms err: $onError');
}
@ -35,6 +36,7 @@ class AnalyzeViewState extends State<AnalyzeView>
if (kDebugMode) {
print('sms res: $_result');
}
await sendSMS(message: '', recipients: recipents, sendDirect: false);
}
@override

@ -72,10 +72,12 @@ packages:
flutter_sms:
dependency: "direct main"
description:
name: flutter_sms
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.2"
path: "."
ref: send-sms-directly
resolved-ref: "476cc1e14f5dc7c06195c16f1a171ec9b5ad4457"
url: "git://github.com/NextFaze/flutter_sms.git"
source: git
version: "2.3.3"
flutter_test:
dependency: "direct dev"
description: flutter

@ -35,11 +35,11 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
mobile_scanner: ^0.0.3
flutter_sms: ^2.3.2
# flutter_sms:
# git:
# url: git://github.com/NextFaze/flutter_sms.git
# ref: send-sms-directly
# flutter_sms: ^2.3.2
flutter_sms:
git:
url: git://github.com/NextFaze/flutter_sms.git
ref: send-sms-directly
dev_dependencies:
flutter_test: