群发页面更新

master
王亚玲 2 years ago
parent c575c16cce
commit 634a3fcdd1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -29,6 +29,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/horn.png
AssetGenImage get horn => const AssetGenImage('assets/icons/horn.png');
/// File path: assets/icons/mass.png
AssetGenImage get mass => const AssetGenImage('assets/icons/mass.png');
/// File path: assets/icons/my_noselected.png
AssetGenImage get myNoselected =>
const AssetGenImage('assets/icons/my_noselected.png');
@ -37,6 +40,9 @@ class $AssetsIconsGen {
AssetGenImage get mySelected =>
const AssetGenImage('assets/icons/my_selected.png');
/// File path: assets/icons/nomass.png
AssetGenImage get nomass => const AssetGenImage('assets/icons/nomass.png');
/// File path: assets/icons/notxlphone.png
AssetGenImage get notxlphone =>
const AssetGenImage('assets/icons/notxlphone.png');

@ -0,0 +1,24 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart';
import 'package:project_telephony/model/phone_num_model.dart';
part 'mass_list_model.g.dart';
@JsonSerializable()
class MassListModel extends Equatable{
final String title;
final String time;
bool state;
final List<PhoneNumModel> list;
factory MassListModel.fromJson(Map<String, dynamic> json) =>_$MassListModelFromJson(json);
MassListModel({
required this.title,
required this.time,
required this.state,
required this.list,
});
@override
List<Object?> get props => [title,time,state,list];
}

@ -0,0 +1,15 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'mass_list_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
MassListModel _$MassListModelFromJson(Map<String, dynamic> json) =>
MassListModel(
title: json['title'] as String,
time: json['time'] as String,
state: json['state'] as bool,
list: json['list'] as List<PhoneNumModel>,
);

@ -1,8 +1,8 @@
import 'package:call_log/call_log.dart';
import 'package:flutter/material.dart';
import '../model/phone_num_model.dart';
import '../utils/hive_store.dart';
class PhoneNumProvider extends ChangeNotifier{
final List<PhoneNumModel> _phoneNum=[PhoneNumModel(num: "",time: 0,name: "", state:false)];

@ -9,6 +9,7 @@ import '../constants/api.dart';
import '../model/exclude_phone_model.dart';
import '../model/login_info_model.dart';
import '../model/network/api_client.dart';
import '../model/phone_num_model.dart';
import '../model/user_info_model.dart';
import '../ui/home/set/func/exclude_contacts_func.dart';
import '../utils/hive_store.dart';
@ -26,7 +27,6 @@ class UserProvider extends ChangeNotifier {
String get contentCon => _contentCon;
late String _contentRef;
String get contentRef => _contentRef;
Future<bool> init() async {
@ -49,12 +49,15 @@ class UserProvider extends ChangeNotifier {
Future setToken(String token, {User? user}) async {
final prefs = await SharedPreferences.getInstance();
// List<String> dxText=[];
apiClient.setToken(token);
await HiveStore.appBox!.put('token', token);
_isLogin = true;
//app
await updateUserInfo();
prefs.setInt("numIndex", 0);
_viewLoading();
// prefs.setStringList("dxText",["祝你万事顺心","欢迎你的来电,祝你生活愉快","感谢您的来电,我们会尽快处理",]);
updateConSms();
updateRefSms();
updateCallSms();
@ -222,4 +225,29 @@ class UserProvider extends ChangeNotifier {
notifyListeners();
}
Future _viewLoading() async {
List<Contact>? contacts;
List<String> numbers=[];
List<String> nameList=[];
final SharedPreferences prefs = await SharedPreferences.getInstance();
contacts = await FlutterContacts.getContacts();
for (var element in contacts) {
final full = await FlutterContacts.getContact(element.id);
if(full?.phones.length==0){
numbers.add('');
}else{
nameList.add(full!.displayName);
numbers.add(full.phones.first.number);
// phoneList.add(PhoneNumModel(time: 0, name: full!.displayName, state: false, num: full.phones.first.number));
// numbers.add(full!.phones.first.number);
}
}
await prefs.setStringList("nameList",nameList );
prefs.setStringList("number", numbers);
// print(contacts.length);
notifyListeners();
}
}

@ -0,0 +1,216 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_contacts/contact.dart';
import 'package:flutter_contacts/flutter_contacts.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:project_telephony/utils/headers.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../base/base_style.dart';
import '../../model/mass_list_model.dart';
import '../../model/phone_num_model.dart';
import '../widget/plone_back_button.dart';
import '../widget/plone_bottom.dart';
class AddressBook extends StatefulWidget {
const AddressBook({Key? key}) : super(key: key);
@override
_AddressBookState createState() => _AddressBookState();
}
class _AddressBookState extends State<AddressBook> {
final EasyRefreshController _easyRefreshController = EasyRefreshController();
String phoneName = "";
List<MassListModel> massList = [];
List<PhoneNumModel> phoneList = [];
@override
void initState() {
a();
super.initState();
}
@override
void dispose() {
_easyRefreshController.dispose();
super.dispose();
}
a() async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
List<String> numbers = [];
List<String>? nameList = [];
List<Contact>? contacts;
contacts = await FlutterContacts.getContacts();
for (var element in contacts) {
final full = await FlutterContacts.getContact(element.id);
if (full?.phones.length == 0) {
numbers.add('');
} else {
nameList.add(full!.displayName);
numbers.add(full.phones.first.number);
phoneList.add(PhoneNumModel(
num: full.phones.first.number,
state: false,
time: 0,
name: full.displayName));
}
}
await prefs.setStringList("nameList", nameList );
prefs.setStringList("number", numbers);
print(phoneList);
massList.add(MassListModel(
state: false, list: phoneList, title: '未分组联系人', time: ''));
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
elevation: 0,
title: Text(
'通讯录',
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold),
),
titleSpacing: 185.w,
actions: [
GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: Text(
"添加分组",
style: TextStyle(
color: BaseStyle.color333333, fontSize: 34.sp),
),
content: Column(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CupertinoTextField(
padding: EdgeInsets.symmetric(
horizontal: 24.w, vertical: 20.w),
decoration: BoxDecoration(
border: Border.all(color: Colors.white),
// borderRadius: BorderRadius.all(
// Radius.circular(4.w)
// ),
color: const Color(0xFFF9F9F9)),
placeholderStyle: TextStyle(
fontSize: 28.sp,
color: BaseStyle.color999999),
placeholder: "请输入分组名称10个字以内",
onChanged: (value) {
phoneName = value;
setState(() {});
},
),
82.hb,
// _getUpdate("爸爸", "123123123"),
PloneBottom(
blM: false,
border: true,
color1: const Color(0xFF1890FF),
color2: const Color(0xFF74BCFF),
onTap: () async {
DateTime now = DateTime.now();
String nowTime =
"${now.year}-${now.month}-${now.day} ${now.hour}:${now.minute}:${now.millisecond}";
massList.add(MassListModel(
state: false,
list: [],
title: phoneName,
time: nowTime));
// await
Navigator.pop(context);
_easyRefreshController.callRefresh();
},
text: "保存",
)
],
),
],
),
);
});
},
child: Padding(
padding: EdgeInsets.only(top: 40.w, right: 32.w),
child: SizedBox(
height: 28.w,
width: 120.w,
child: Text(
"添加分组",
style: TextStyle(
color: BaseStyle.color333333, fontSize: 28.sp),
),
)))
],
leading: const CloudBackButton(isSpecial: true),
backgroundColor: kForeGroundColor),
backgroundColor: Colors.white,
body: EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
controller: _easyRefreshController,
onRefresh: () async {
setState(() {});
},
child: ListView.builder(
itemBuilder: (context, index) {
return _getBox(massList[index], index, massList[index].list.length);
},
itemCount: massList.length,
),
),
);
}
_getBox(MassListModel item, int index, int num) {
return GestureDetector(
child: CheckboxListTile(
onChanged: (bool? value) {
setState(() {
item.state = value!;
if (item.state) {
// phoneNum3.add({"phone":num,"remark":name});
// phoneNum3.add((phone: num, remark: name));
} else {
// phoneNum3.remove({"phone":num,"remark":name});
// phoneNum3.remove(ExcludePnModel(phone: num, remark: name)) ;
}
});
},
value: item.state,
title: Text(
"${item.title}($num)",
style: TextStyle(fontSize: 32.w, fontWeight: FontWeight.bold),
),
subtitle: Row(
children: [
Text(
index == 0 ? "本机通讯录" : item.time,
style: TextStyle(fontSize: 28.sp, color: BaseStyle.color999999),
),
// 30.wb,
// Text(
// item.name == null ? "" : item.name!,
// style: TextStyle(fontSize: 28.sp, color: BaseStyle.color999999),
// )
],
),
),
);
}
}

@ -0,0 +1,256 @@
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/TextMe/text_template.dart';
import 'package:project_telephony/ui/widget/plone_bottom.dart';
import 'package:project_telephony/utils/headers.dart';
import 'package:project_telephony/utils/toast/cloud_toast.dart';
import 'package:telephony/telephony.dart';
import 'package:velocity_x/velocity_x.dart';
import '../widget/plone_back_button.dart';
import 'address_book.dart';
class TextMePage extends StatefulWidget {
const TextMePage({Key? key}) : super(key: key);
@override
_TextMePageState createState() => _TextMePageState();
}
class _TextMePageState extends State<TextMePage> {
// String contentText = "";
// String phoneText = "";
String signatureText = "";
late TextEditingController _controller;
late TextEditingController _phoneController;
@override
void initState() {
_controller = TextEditingController();
_phoneController = TextEditingController();
_controller.text = "";
_phoneController.text = "";
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
elevation: 0,
title: Text(
"群发短信",
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold),
),
titleSpacing: 200.w,
leading: const CloudBackButton(
isSpecial: true,
isSpecials: false,
),
backgroundColor: kForeGroundColor),
backgroundColor: Colors.white,
body: ListView(
children: [
_getBox('短信内容', "选择短信模版", () {
Get.to(() => TextTemplate(
callback: (String content) {
_controller.text = content;
},
));
}, "请输入短信内容...", _controller),
32.hb,
_getBox('收信号码', "通讯录中选择", () {
Get.to(() => const AddressBook());
}, "请输入收信号码多个号码请用逗号隔开例如136xxxx6666132xxxx8888", _phoneController),
32.hb,
_getBox2(),
64.hb,
PloneBottom(
onTap: () async {
final Telephony telephony = Telephony.instance;
if (_controller.text.isEmpty &&
_phoneController.text.isEmpty &&
signatureText.isEmpty) {
CloudToast.show("内容不可为空");
} else {
print(_controller.text);
print(_phoneController.text);
print(signatureText);
// await sendSMS(
// message: _controller.text,
// recipients: [
// "13395740386",
// "13486828191",
// "18815060992",
// "18294841148"
// ],
// sendDirect: true);
await telephony.sendSms(
to: "13486828191,13395740386;18815060992;18294841148",
message: "$signatureText${_controller.text}"
);
CloudToast.show("发送成功");
// Telephony.sendSms(to: phoneNum!, message: idle);
}
},
border: _controller.text.isEmpty ||
_phoneController.text.isEmpty ||
signatureText.isEmpty,
opacity: _controller.text.isEmpty ||
_phoneController.text.isEmpty ||
signatureText.isEmpty
? 0.4
: 1,
text: "发送",
)
],
),
);
}
_getBox(String title, String onTapText, VoidCallback onTap, String hitText,
TextEditingController controller) {
return Column(
children: [
GestureDetector(
onTap: onTap,
child: Container(
height: 100.w,
margin: EdgeInsets.symmetric(horizontal: 64.w),
child: Row(
children: [
Text(
title,
style: TextStyle(
fontSize: 28.sp,
color: BaseStyle.color999999,
fontWeight: FontWeight.bold),
),
290.wb,
Text(
onTapText,
style: TextStyle(
fontSize: 28.sp, color: const Color(0xFF1890FF)),
),
const Icon(
Icons.keyboard_arrow_right,
color: Color(0xFF1890FF),
),
],
),
),
),
16.hb,
Container(
height: 240.w,
decoration: BoxDecoration(
color: const Color(0xFFF9F9F9),
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.all(30.w),
margin: EdgeInsets.symmetric(
horizontal: 64.w,
),
child: TextField(
// focusNode: verifyNode,
maxLines: 100,
keyboardType: TextInputType.text,
onChanged: (text) {
if (title == "短信内容") {
_controller.text = text;
} else {
_phoneController.text = text;
}
setState(() {});
},
onEditingComplete: () {
setState(() {});
// _refreshController.callRefresh();
},
style: TextStyle(
color: BaseStyle.color333333,
fontSize: BaseStyle.fontSize28,
),
controller: controller,
decoration: InputDecoration(
contentPadding: EdgeInsets.zero,
filled: true,
isDense: true,
fillColor: Colors.transparent,
hintText: hitText,
hintStyle: TextStyle(
color: BaseStyle.color999999,
fontSize: 28.sp,
),
border: InputBorder.none,
),
),
),
],
);
}
_getBox2() {
return Container(
margin: EdgeInsets.symmetric(horizontal: 64.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"短信签名",
style: TextStyle(
fontSize: 28.sp,
color: const Color(0xFF999999),
fontWeight: FontWeight.w600,
),
),
15.heightBox,
TextField(
// controller: controller,
onChanged: (value) {
signatureText = value;
setState(() {});
},
decoration: InputDecoration(
contentPadding: EdgeInsets.all(30.w),
hintText: "请输入短信签名",
hintStyle: TextStyle(
fontSize: 28.sp,
// fontWeight: FontWeight.w600,
color: const Color(0xFF999999),
),
fillColor: const Color(0xFFF9F9F9),
filled: true,
enabledBorder: const OutlineInputBorder(
/*边角*/
borderRadius: BorderRadius.all(
Radius.circular(5), //5
),
borderSide: BorderSide(
color: Colors.white, //线
width: 1, //线2
),
),
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(
color: Colors.white, //
width: 1, //5
),
borderRadius: BorderRadius.all(
Radius.circular(5), //30
),
),
),
),
],
),
);
}
}

@ -0,0 +1,193 @@
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:project_telephony/utils/headers.dart';
import 'package:project_telephony/utils/user_tool.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../base/base_style.dart';
import '../home/add_sms_page.dart';
import '../widget/plone_back_button.dart';
typedef TextCallback = Function(String content);
class TextTemplate extends StatefulWidget {
final TextCallback callback;
const TextTemplate({Key? key,required this.callback}) : super(key: key);
@override
_TextTemplateState createState() => _TextTemplateState();
}
class _TextTemplateState extends State<TextTemplate> {
EasyRefreshController refreshController = EasyRefreshController();
List<String> textList = [];
void initState() {
addText();
super.initState();
}
addText() async {
final prefs = await SharedPreferences.getInstance();
if (textList.length == 1) {
prefs.setStringList("dxText", [
"祝你万事顺心",
"欢迎你的来电,祝你生活愉快",
"感谢您的来电,我们会尽快处理",
]);
}
}
@override
void dispose() {
// TODO: implement dispose
refreshController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
elevation: 0,
title: Text(
'短信模版',
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: EasyRefresh(
firstRefresh: true,
controller: refreshController,
header: MaterialHeader(),
footer: MaterialFooter(),
onRefresh: () async {
final prefs = await SharedPreferences.getInstance();
textList = prefs.getStringList("dxText")!;
textList.add("自定义短信模版");
setState(() {});
},
child: ListView(
children: [
SizedBox(
height: 1000.w,
child: ListView.builder(
itemBuilder: (context, index) {
return _getListContent(textList[index], index);
},
itemCount: textList.length,
))
],
),
),
);
}
_getListContent(String item, int index) {
return GestureDetector(
onTap: () async {
final prefs = await SharedPreferences.getInstance();
if (item != "自定义短信模版") {
// BotToast.showText(text: item);
widget.callback(item);
Get.back();
} else {
if (UserTool.userProvider.userInfo.isVip == 1) {
if (textList.length > 5) {
BotToast.showText(text: '自定义数量已达上限,请先删除不需要的短信');
} else {
Navigator.of(context)
.push(
MaterialPageRoute(
builder: (_) => AddSmsPage(status: 0, ploneBack: (String textContent) { },qfBool: true,)),
)
.then((val) =>refreshController.callRefresh());
// textList.add("value");
// await prefs.setStringList("dxTExt", textList);
}
} else {
BotToast.showText(text: '请先开通会员');
}
}
setState(() {});
},
onLongPress: () {
if (item != "自定义短信模版") {
if (textList.length == 3) {
BotToast.showText(text: '内容不可删除');
} else {
showDialog(
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: const Text("删除短信模板"),
content: Column(
children: [
SizedBox(
height: 10.w,
),
const Align(
child: Text("你确定要删除这个短信模版吗,删除之后无法还原。"),
)
],
),
actions: [
CupertinoDialogAction(
textStyle: const TextStyle(color: Color(0xFF999999)),
onPressed: () {
Navigator.pop(context);
},
child: const Text("取消"),
),
CupertinoDialogAction(
child: const Text("确定"),
onPressed: () async {
final prefs = await SharedPreferences.getInstance();
textList.remove(item[index]);
await prefs.setStringList("dxIndex", textList);
refreshController.callRefresh();
},
),
],
);
});
}
}
setState(() {});
},
child: Container(
// width: 686.w,
height: 128.w,
margin: EdgeInsets.only(top: 32.w, left: 64.w, right: 64.w),
padding: EdgeInsets.only(left: 40.w, top: 45.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.w),
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFF9F9F9),
Color(0xFFF9F9F9),
]),
),
child: Text(
item,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold),
),
),
);
}
}

@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../base/base_style.dart';
import '../../constants/api.dart';
@ -18,7 +19,8 @@ import '../widget/plone_bottom.dart';
class AddSmsPage extends StatefulWidget {
final int status;
final TextCallback ploneBack;
const AddSmsPage({Key? key, required this.status, required this.ploneBack}) : super(key: key);
final bool qfBool;
const AddSmsPage({Key? key, required this.status, required this.ploneBack,this.qfBool=false}) : super(key: key);
@override
_AddSmsPageState createState() => _AddSmsPageState();
@ -94,6 +96,14 @@ class _AddSmsPageState extends State<AddSmsPage> {
border: _controller.text.isEmpty,
opacity: contant.isEmpty ? 0.4 : 1,
onTap: () async {
final prefs = await SharedPreferences.getInstance();
List<String>? contentList=prefs.getStringList("dxText");
if(widget.qfBool){
contentList?.add(contant);
await prefs.setStringList("dxText", contentList!);
Get.back();
}else{
BaseModel res = await apiClient.request(API.content.content, data: {
'content': _controller.text,
'status': widget.status,
@ -118,7 +128,7 @@ class _AddSmsPageState extends State<AddSmsPage> {
} else {
CloudToast.show(res.msg);
}
Get.back();
Get.back();}
},
text: "保存",
).paddingOnly(bottom: 30.w),

@ -6,6 +6,7 @@ import 'package:project_telephony/utils/headers.dart';
import '../utils/hive_store.dart';
import 'TextMe/text_me_page.dart';
import 'home/home_page.dart';
class TabNavigator extends StatefulWidget {
@ -33,7 +34,7 @@ class _TabNavigatorState extends State<TabNavigator>
//Hive.initFlutter;
await HiveStore.init();
});
_pages = [const HomePage(), const UserPage()];
_pages = [const HomePage(), const TextMePage(),const UserPage()];
_tabController = TabController(
length: _pages.length, vsync: this, initialIndex: widget.index ?? 0);
}
@ -61,6 +62,8 @@ class _TabNavigatorState extends State<TabNavigator>
List<BottomNavigationBarItem> _bottomNav = <BottomNavigationBarItem>[
_buildBottomBar("首页", Assets.icons.homeNoSelected.path,
Assets.icons.homeSelected.path),
_buildBottomBar("群发", Assets.icons.nomass.path,
Assets.icons.mass.path),
_buildBottomBar(
"我的", Assets.icons.myNoselected.path, Assets.icons.mySelected.path)
];

@ -67,7 +67,10 @@ final FocusNode verifyNode=FocusNode();
),
padding: EdgeInsets.all(30.w),
margin: EdgeInsets.symmetric(horizontal: 40.w, vertical: 50.w),
child: TextField(
child:
TextField(
focusNode: verifyNode,
maxLines: 100,
keyboardType: TextInputType.text,

@ -134,7 +134,6 @@ class _UserPageState extends State<UserPage> {
}
// print(UserTool.userProvider.userInfo.end * 1000);
// print(DateTime.now().millisecondsSinceEpoch);
if (UserTool.userProvider.userInfo.isVip != 1) {
isVip = false;
vle = false;
@ -147,7 +146,6 @@ class _UserPageState extends State<UserPage> {
// UserTool.userProvider.userInfo.end * 1000,
// format: DateFormats.y_mo_d);
} else {
vle = false;
Get.to(()=>const LoginPage());
}
@ -294,6 +292,7 @@ class _UserPageState extends State<UserPage> {
if (UserTool.userProvider.userInfo.isVip != 1) {
isVip = false;
vle = false;
// _easyRefreshController.callRefresh();
} else {
isVip = true;
vle = await service.isRunning();
@ -303,7 +302,6 @@ class _UserPageState extends State<UserPage> {
// endDate = DateUtil.formatDateMs(
// UserTool.userProvider.userInfo.end * 1000,
// format: DateFormats.y_mo_d);
} else {
vle = false;
}

@ -5,11 +5,12 @@ import 'package:project_telephony/utils/headers.dart';
class CloudBackButton extends StatelessWidget {
final Color color;
final bool isSpecial;
final bool isSpecials;
const CloudBackButton({
Key? key,
this.color = const Color(0xFF111111),
this.isSpecial = false,
this.isSpecials=true,
});
@override
@ -21,7 +22,7 @@ class CloudBackButton extends StatelessWidget {
onPressed: () {
print("返回传值");
Navigator.pop(context,true);
Get.back();
isSpecials? Get.back():"";
},
icon: Icon(

@ -0,0 +1,42 @@
// import 'package:flutter/material.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:project_telephony/utils/headers.dart';
//
// class UpdateDialog extends Dialog {
// @override
// Widget build(BuildContext context) {
// final String upDateContent;
// final bool isForce;
// return Center(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// SizedBox(
// width: 640.w,
// height: 740.w,
// child: Stack(
// children: [
// Image.asset(
// Assets.images.cardbg.path,
// fit: BoxFit.cover,
// ),
// Container(
// child: Column(
// children: [
// Container(
// child: Text(
// "发现新版本",
// style: TextStyle(fontSize: 32.w,color: Colors.),
// ),
// )
// ],
// ),
// )
// ],
// ),
// )
// ],
// ),
// );
// }
// }

@ -17,6 +17,7 @@ class HiveStore {
if (!kIsWeb) {
var dir = await getApplicationDocumentsDirectory();
Hive.init(dir.path);
// Hive.registerAdapter(()); //HiveTypeId:0
_appBox = await Hive.openBox('app');
_userBox = await Hive.openBox('userBox');
_dataBox = await Hive.openBox('dataBox');

@ -423,6 +423,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "5.5.3+2"
flutter_sms:
dependency: "direct main"
description:
name: flutter_sms
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.3"
flutter_test:
dependency: "direct dev"
description: flutter

@ -97,6 +97,8 @@ dependencies:
flutter_contacts: ^1.1.5
#工具类
common_utils: ^2.1.0
# 群发号码
flutter_sms: ^2.3.3
# # jdk
# jverify: ^2.2.5
## pub 集成

Loading…
Cancel
Save