|
|
|
@ -2,7 +2,6 @@
|
|
|
|
|
import 'package:call_log/call_log.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:flutter_sms/flutter_sms.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:project_telephony/base/base_style.dart';
|
|
|
|
|
import 'package:project_telephony/ui/home/content_details_page.dart';
|
|
|
|
@ -73,32 +72,6 @@ class _ContentPageState extends State<ContentPage> {
|
|
|
|
|
} else {
|
|
|
|
|
final Iterable<CallLogEntry> result = await CallLog.query();
|
|
|
|
|
phoneNum = result.first.number!;
|
|
|
|
|
await sendSMS(message:content, recipients: [phoneNum], sendDirect: true);
|
|
|
|
|
// bool? permissionsGranted = await telephony.requestPhonePermissions;
|
|
|
|
|
// print(permissionsGranted);
|
|
|
|
|
// if(permissionsGranted!){
|
|
|
|
|
// print(content);
|
|
|
|
|
// // sendSms(content);
|
|
|
|
|
// telephony.sendSms(
|
|
|
|
|
// to: "13395740386",
|
|
|
|
|
// message: content,
|
|
|
|
|
// );
|
|
|
|
|
// }else{
|
|
|
|
|
// print(content);
|
|
|
|
|
// }
|
|
|
|
|
// print(content);
|
|
|
|
|
// // sendSms(content);
|
|
|
|
|
// telephony.sendSms(
|
|
|
|
|
// to: "13395740386",
|
|
|
|
|
// message: content,
|
|
|
|
|
// isMultipart: true
|
|
|
|
|
// );
|
|
|
|
|
// List<String> recipents=[
|
|
|
|
|
// phoneNum
|
|
|
|
|
// ];
|
|
|
|
|
// _sendSMS(content,recipents);
|
|
|
|
|
// String phoneNumber = await GetPhoneNumber().get();
|
|
|
|
|
// print('getPhoneNumber result: $phoneNumber');
|
|
|
|
|
}
|
|
|
|
|
setState(() {});
|
|
|
|
|
// print("这是数据" + textList[_s lect]);
|
|
|
|
|