新增内容

master
戴余标 2 years ago
parent 1449239940
commit 7da6a68c03

@ -94,7 +94,7 @@ void onStart(ServiceInstance service) async {
}else{ }else{
if(idleSw!){ if(idleSw!){
print(idleSw); print(idleSw);
print("${phoneNum!}:${call!}"); print("${phoneNum!}:${idle!}");
Telephony.backgroundInstance.sendSms(to: phoneNum!, message: idle!); Telephony.backgroundInstance.sendSms(to: phoneNum!, message: idle!);
} }
print("去电未接"); print("去电未接");

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/headers.dart';
import 'package:project_telephony/utils/user_tool.dart';
import '../../constants/api.dart'; import '../../constants/api.dart';
import '../../model/network/api_client.dart'; import '../../model/network/api_client.dart';
@ -61,20 +62,19 @@ class AppDialog extends Dialog {
} }
} }
_getBotton(String bContent, context) { _getBotton(String bContent, context) {
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
var res = await apiClient.request(API.app.trialVip); var res = await apiClient.request(API.app.trialVip);
if (res.code == 0) { if (res.code == 0) {
CloudToast.show(res.msg); CloudToast.show(res.msg);
UserTool.userProvider.updateUserInfo();
Navigator.pop(context);
} else { } else {
CloudToast.show(res.msg); CloudToast.show(res.msg);
Navigator.pop(context);
} }
}, },
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 64.w), margin: EdgeInsets.symmetric(horizontal: 64.w),
width: 500.w, width: 500.w,

@ -0,0 +1,65 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:project_telephony/model/sms_content_model.dart';
import 'package:project_telephony/utils/user_tool.dart';
import 'package:provider/provider.dart';
import '../../base/base_style.dart';
import '../../constants/api.dart';
import '../../model/network/api_client.dart';
import '../../model/network/base_model.dart';
import '../../model/user_info_model.dart';
import '../../providers/user_provider.dart';
import '../../utils/toast/cloud_toast.dart';
import '../user/content_details_page.dart';
import '../widget/plone_back_button.dart';
import '../widget/plone_bottom.dart';
class ScaffoldThemeWidget extends StatefulWidget {
final String title;
final Widget child;
final String bottom;
const ScaffoldThemeWidget(
{Key? key, required this.title, required this.child, required this.bottom})
: super(key: key);
@override
_ScaffoldThemeWidgetState createState() => _ScaffoldThemeWidgetState();
}
class _ScaffoldThemeWidgetState extends State<ScaffoldThemeWidget> {
@override
void initState() {
super.initState();
}
// final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
elevation: 0,
title: Text(
widget.title,
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold),
),
titleSpacing: 162.w,
leading: const CloudBackButton(isSpecial: true),
backgroundColor: kForeGroundColor),
backgroundColor: Colors.white,
body: widget.child,
bottomNavigationBar: PloneBottom(
onTap: () async {
},
text: widget.bottom,
).paddingOnly(bottom: 30.w),
);
}
}
Loading…
Cancel
Save