|
|
|
@ -6,6 +6,7 @@ import 'package:project_telephony/base/base_style.dart';
|
|
|
|
|
import 'package:project_telephony/ui/widget/centertipsalterwidget.dart';
|
|
|
|
|
import 'package:project_telephony/ui/widget/plone_back_button.dart';
|
|
|
|
|
import 'package:project_telephony/utils/headers.dart';
|
|
|
|
|
import 'package:project_telephony/utils/user_tool.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import '../../constants/api.dart';
|
|
|
|
|
import '../../model/network/api_client.dart';
|
|
|
|
@ -26,8 +27,6 @@ class _ContentRefusePageState extends State<ContentRefusePage> {
|
|
|
|
|
List<String> textListSMS = [];
|
|
|
|
|
List<int> smsIdList = [];
|
|
|
|
|
int isCheck=0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
|
|
|
|
|
final EasyRefreshController _easyRefreshController = EasyRefreshController();
|
|
|
|
|
|
|
|
|
@ -75,11 +74,15 @@ class _ContentRefusePageState extends State<ContentRefusePage> {
|
|
|
|
|
backgroundColor: kForeGroundColor,
|
|
|
|
|
),
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
body: Column(children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: _getList(),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
body: _getList()
|
|
|
|
|
// Column(children: [
|
|
|
|
|
// _getEditContent(),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: _getList(),
|
|
|
|
|
// ),
|
|
|
|
|
//
|
|
|
|
|
// ]),
|
|
|
|
|
// bottomNavigationBar: _getEditContent(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -136,9 +139,14 @@ class _ContentRefusePageState extends State<ContentRefusePage> {
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
onLongPress: () {
|
|
|
|
|
|
|
|
|
|
if (content != "自定义短信内容") {
|
|
|
|
|
if (textListSMS.length == 2) {
|
|
|
|
|
BotToast.showText(text: '不能再删了');
|
|
|
|
|
if (textListSMS.length == 2 || isCheck == index) {
|
|
|
|
|
if(textListSMS.length == 2){
|
|
|
|
|
BotToast.showText(text: '最后一条内容不可删除');
|
|
|
|
|
}else if(isCheck == index){
|
|
|
|
|
BotToast.showText(text: '当前为选中内容,不可删除');
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
@ -156,13 +164,22 @@ class _ContentRefusePageState extends State<ContentRefusePage> {
|
|
|
|
|
}
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
child:
|
|
|
|
|
Container(
|
|
|
|
|
// width: 686.w,
|
|
|
|
|
height: 128.w,
|
|
|
|
|
margin: EdgeInsets.only(top: 32.w, left: 64.w, right: 64.w),
|
|
|
|
|
padding: EdgeInsets.all(40.w),
|
|
|
|
|
padding: EdgeInsets.only(left: 40.w,top: 45.w),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(16),
|
|
|
|
|
color: index==isCheck?const Color(0xFF72E4C8) :const Color(0xFFF9F9F9),
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
begin: Alignment.centerLeft,
|
|
|
|
|
end: Alignment.centerRight,
|
|
|
|
|
colors: [
|
|
|
|
|
index==isCheck? const Color(0xFF13CA9D):const Color(0xFFF9F9F9),
|
|
|
|
|
index==isCheck? const Color(0xFF72E4C8):const Color(0xFFF9F9F9),
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
child: Text(
|
|
|
|
|
content,
|
|
|
|
@ -174,4 +191,43 @@ class _ContentRefusePageState extends State<ContentRefusePage> {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
// int _getEasyRefresh(){
|
|
|
|
|
// return EasyRefresh(onRefresh: ,child: ,);
|
|
|
|
|
// }
|
|
|
|
|
// _getEditContent(){
|
|
|
|
|
// return GestureDetector(
|
|
|
|
|
// onTap: (){
|
|
|
|
|
// if (userProvider.userInfo.isVip==1) {
|
|
|
|
|
// if (textListSMS.length > 5) {
|
|
|
|
|
// BotToast.showText(text: '自定义数量已达上限,请先删除不需要的短信');
|
|
|
|
|
// } else {
|
|
|
|
|
// Get.to(AddSmsPage(
|
|
|
|
|
// status: 2,
|
|
|
|
|
// ploneBack: (String textContent) {
|
|
|
|
|
// _easyRefreshController.callRefresh();
|
|
|
|
|
// },
|
|
|
|
|
// ));
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// BotToast.showText(text: '请先开通会员');
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// ,child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 128.w,
|
|
|
|
|
// margin: EdgeInsets.symmetric(horizontal: 64.w),
|
|
|
|
|
// padding: EdgeInsets.only(left: 40.w,top: 45.w),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// borderRadius: BorderRadius.circular(16),
|
|
|
|
|
// color: const Color(0xFFF9F9F9),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Text(
|
|
|
|
|
// "定义短信内容",
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: BaseStyle.fontSize28,
|
|
|
|
|
// color: BaseStyle.color333333,
|
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
|
// ),
|
|
|
|
|
// ),);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|