From 2751dc6d9fd413e3e186ee0d3309775e39bd9698 Mon Sep 17 00:00:00 2001 From: datang Date: Mon, 22 Aug 2022 23:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{home_ selected.png => home_selected.png} | Bin assets/images/portrait_deep.png | Bin 0 -> 16585 bytes lib/constants/api.dart | 12 ++- lib/gen/assets.gen.dart | 6 +- lib/model/user_info_model.dart | 39 ++++---- lib/model/user_info_model.g.dart | 6 +- lib/ui/home/content_connect_page.dart | 70 ++++++++----- lib/ui/home/content_refuse_page.dart | 92 +++++++++++------- lib/ui/login/login_page.dart | 2 +- lib/ui/user/user_page.dart | 82 +++++++--------- lib/ui/widget/centertipsalterwidget.dart | 9 +- pubspec.lock | 34 +++---- 12 files changed, 202 insertions(+), 150 deletions(-) rename assets/icons/{home_ selected.png => home_selected.png} (100%) create mode 100644 assets/images/portrait_deep.png diff --git a/assets/icons/home_ selected.png b/assets/icons/home_selected.png similarity index 100% rename from assets/icons/home_ selected.png rename to assets/icons/home_selected.png diff --git a/assets/images/portrait_deep.png b/assets/images/portrait_deep.png new file mode 100644 index 0000000000000000000000000000000000000000..7f7440b35d1c7dd051499428721c442ae16ff2e5 GIT binary patch literal 16585 zcmV*LKxDs(P)PyA07*naRCr$PeF>OdMVaQC4l$Le@fw9rSUF+HxS^p zrVgxV53pgN#`@*}9}jpF>mF}a9Tg9vpMTNFzwwh(0*BqKTRvQm9XbbKyFgDrJLzKcmXegtcqGA`7)+(=k$Udv+ z=S3Ztx)VL;`&>aQpbZ)y16T`SWf0>+06DAS{0JO!aoZ*YXqrGz=gXj#d+H!w|I= zBiezj5MVNZlL1U54%kt2s+gK7sQFA6Ja+sOD}KS57uqU$cJK4lfW$V6Z=mn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;pX_jk-Oh3&M(FSXkUIR|*%mx8eS-lq;;3a_4EM*BF2u%qe&4(H)(* z-jGY7u(7$MBZfsJohOz+BvHX@Kpq2$-a)ZmLcTo7mUr^oB|C}?PW zq!b=OfG<~Cr8$qX*5a97X8=YB=iRJZR&In7bcpkzairxEIoM9hqVUBo`2vSek}@{9 zJq3ZqvN6{ZDLfVc^VSc+y_MAGuZ2>V(`K(UfM|ePtEqQj)24wqR)_c|%*B1Sn5wWT z6hj?m7@R7ccF2aaRed!wrFS`sLzRg3hj@D))i`#KBT^)bQiI+olOrp|Q^{%EDsv&7 zQn*}q;GtPl@Ig;;dCF0C>Dk_E0Aw^L-l4Zq1MnYOW2#cvOldSbicO#q7eb7mgpD%( znWJreTLmF5M2HJCuu0}Y65kO<=1D0Gangr(*0SecAx5pijS7Z>QTaMQa=d;837&y=z{~Eg%MG4l~cr zIzZk%2V7U&9)(o^o-lXr>H)Za?lJ21dQ#R}^rc@IfDxP_*}bwihOcYGm;jirLRy6u^fE5Pjbc9$iNMY%yXRxZ?NNcrFel|6=dPRM6qv3?nU7>O>Zj`SEVdNhh&LI+SLjyoY0aYZVW-Cjiz# z;R66KLF2BihvKf*Nve1^e0|PWt$NjOB7jeTr!Uk4gXYKp4$vC=L19m&v5To{%~^C- zSg}%?MtjMfTncE1!biq53Th08bA63h*1g;%}{!)cP`p)vq6I7(f@M|FFfn`L!tiqyPW_Ye_^wR1+Uz@H$|K>Of1U!k~cx zMk-+YPKB{h*c>4?H}ni+97 '/app/user/content'; ///删除自定义短信 String get delete => '/app/user/content/delete'; + ///选择自定义短信 + String get checked => '/app/user/content/checked'; ///更新VIP状态(已合并至用户信息) String get updateVip => '/app/user/updateVip'; } diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 06adb78..9678733 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -14,7 +14,7 @@ class $AssetsIconsGen { /// File path: assets/icons/home_ selected.png AssetGenImage get homeSelected => - const AssetGenImage('assets/icons/home_ selected.png'); + const AssetGenImage('assets/icons/home_selected.png'); /// File path: assets/icons/home_noSelected.png AssetGenImage get homeNoSelected => @@ -68,6 +68,10 @@ class $AssetsImagesGen { AssetGenImage get portrait => const AssetGenImage('assets/images/portrait.png'); + /// File path: assets/images/portrait_deep.png + AssetGenImage get portraitDeep => + const AssetGenImage('assets/images/portrait_deep.png'); + /// File path: assets/images/refused.png AssetGenImage get refused => const AssetGenImage('assets/images/refused.png'); diff --git a/lib/model/user_info_model.dart b/lib/model/user_info_model.dart index 07fdb89..d35ed39 100644 --- a/lib/model/user_info_model.dart +++ b/lib/model/user_info_model.dart @@ -12,8 +12,8 @@ class UserInfoModel extends Equatable { final int isVip; final String tag; final int status; - final num start; - final num end; + final int start; + final int end; final List? contentRef; final List? contentCon; @@ -31,35 +31,38 @@ class UserInfoModel extends Equatable { status: 0, start: 0, end: 0, - contentCon: [], - contentRef: [], + contentCon: [], + contentRef: [], ); - const UserInfoModel( - {required this.id, - required this.name, - required this.phone, - required this.isVip, - required this.tag, - required this.status, - required this.start, - required this.end, - required this.contentCon, - required this.contentRef, - }); + const UserInfoModel({ + required this.id, + required this.name, + required this.phone, + required this.isVip, + required this.tag, + required this.status, + required this.start, + required this.end, + required this.contentCon, + required this.contentRef, + }); + @override List get props => - [id, name, phone, isVip, tag, status, start, end, contentCon,contentRef]; + [id, name, phone, isVip, tag, status, start, end, contentCon, contentRef]; } @JsonSerializable() class Content extends Equatable { final int id; final String content; + final int isChecked; const Content({ required this.id, required this.content, + required this.isChecked, }); factory Content.fromJson(Map json) => @@ -68,5 +71,5 @@ class Content extends Equatable { Map toJson() => _$ContentToJson(this); @override - List get props => [id, content]; + List get props => [id, content, isChecked]; } diff --git a/lib/model/user_info_model.g.dart b/lib/model/user_info_model.g.dart index 6761b97..4e82a93 100644 --- a/lib/model/user_info_model.g.dart +++ b/lib/model/user_info_model.g.dart @@ -14,8 +14,8 @@ UserInfoModel _$UserInfoModelFromJson(Map json) => isVip: json['is_vip'] as int, tag: json['tag']as String, status: json['status'] as int, - start: json['start']as num, - end: json['end']as num, + start: json['start']as int, + end: json['end']as int, contentCon:(json['content_con'] as List?) ?.map((e) => Content.fromJson(e as Map)) .toList(), @@ -41,9 +41,11 @@ Map _$UserInfoModelToJson(UserInfoModel instance) => Content _$ContentFromJson(Map json) => Content( id: json['id'] as int, content: json['content'] as String, + isChecked: json['is_checked'] as int, ); Map _$ContentToJson(Content instance) => { 'id': instance.id, 'content': instance.content, + 'is_checked':instance.isChecked, }; \ No newline at end of file diff --git a/lib/ui/home/content_connect_page.dart b/lib/ui/home/content_connect_page.dart index 11d843b..ed808e8 100644 --- a/lib/ui/home/content_connect_page.dart +++ b/lib/ui/home/content_connect_page.dart @@ -7,7 +7,11 @@ 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:provider/provider.dart'; +import '../../constants/api.dart'; +import '../../model/network/api_client.dart'; +import '../../model/network/base_model.dart'; import '../../providers/user_provider.dart'; +import '../../utils/toast/cloud_toast.dart'; class ContentConnectPage extends StatefulWidget { const ContentConnectPage({Key? key}) : super(key: key); @@ -17,20 +21,14 @@ class ContentConnectPage extends StatefulWidget { } class _ContentConnectPageState extends State { - int _select = 0; - List textList = [ - '欢迎您的来电,祝您生活愉快', - '祝您万事顺心', - '感谢您的来电,我们会尽快处理的', - "自定义短信内容" - ]; - List smsIdList =[]; + List textList = ['欢迎您的来电,祝您生活愉快', '自定义短信内容']; + List smsIdList = []; List textListSMS = []; + int isCheck=0; final userProvider = Provider.of(Get.context!, listen: false); final EasyRefreshController _easyRefreshController = EasyRefreshController(); - @override void initState() { super.initState(); @@ -43,13 +41,18 @@ class _ContentConnectPageState extends State { super.dispose(); } - updateList(){ + updateList() { if (userProvider.isLogin) { textListSMS.clear(); smsIdList.clear(); + int i=0; userProvider.userInfo.contentCon?.forEach((model) { textListSMS.add(model.content); smsIdList.add(model.id); + if(model.isChecked==1){ + isCheck=i; + } + i++; }); textListSMS.add("自定义短信内容"); } else { @@ -89,48 +92,61 @@ class _ContentConnectPageState extends State { updateList(); setState(() {}); }, - child:ListView.builder( + child: ListView.builder( itemBuilder: (context, index) { - return _getBox(textListSMS[index], index == _select, index); + return _getBox(textListSMS[index], index); }, itemCount: textListSMS.length, ), ); } - _getBox(String content, bool pd, int index) { + _getBox(String content, int index) { return GestureDetector( onTap: () async { if (content != "自定义短信内容") { - _select = index; + BaseModel res = await apiClient.request(API.app.checked, + data: {'id': smsIdList[index], 'status': 1}); + if (res.code == 0) { + setState(() {}); + userProvider.updateUserInfo(); + _easyRefreshController.callRefresh(); + } else { + CloudToast.show(res.msg); + } } else { - if(userProvider.isLogin){ - if(textListSMS.length>5){ + if (userProvider.isLogin) { + if (textListSMS.length > 5) { BotToast.showText(text: '自定义数量已达上限,请先删除不需要的短信'); - }else{ + } else { Get.to(AddSmsPage( - status: 1, ploneBack: (String textContent) { + status: 1, + ploneBack: (String textContent) { _easyRefreshController.callRefresh(); - }, + }, )); } - }else{ + } else { BotToast.showText(text: '请先登录'); } } setState(() {}); }, onLongPress: () { - if(content != "自定义短信内容"){ - if (textListSMS.length<2 ) { + if (content != "自定义短信内容") { + if (textListSMS.length == 1) { BotToast.showText(text: '不能再删了'); - }else{ + } else { showDialog( context: context, builder: (context) { - return Centertipsalterwidget( + return Centertipsalterwidget( desText: '你确定要删除这个短信模版吗,删除之后无法还原。', - title: '删除短信模板', id: smsIdList[index], + title: '删除短信模板', + id: smsIdList[index], + callback: (bool status) { + _easyRefreshController.callRefresh(); + }, ); }); } @@ -143,13 +159,13 @@ class _ContentConnectPageState extends State { padding: EdgeInsets.all(40.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(16), - color: pd ? Colors.blue : const Color(0xFFF9F9F9), + color: index==isCheck?Colors.blue:const Color(0xFFF9F9F9), ), child: Text( content, style: TextStyle( fontSize: BaseStyle.fontSize28, - color: pd ? const Color(0xFFF9F9F9) : BaseStyle.color333333, + color: index==isCheck?const Color(0xFFF9F9F9):BaseStyle.color333333, fontWeight: FontWeight.bold), ), ), diff --git a/lib/ui/home/content_refuse_page.dart b/lib/ui/home/content_refuse_page.dart index b09dae0..1d86274 100644 --- a/lib/ui/home/content_refuse_page.dart +++ b/lib/ui/home/content_refuse_page.dart @@ -7,7 +7,11 @@ 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:provider/provider.dart'; +import '../../constants/api.dart'; +import '../../model/network/api_client.dart'; +import '../../model/network/base_model.dart'; import '../../providers/user_provider.dart'; +import '../../utils/toast/cloud_toast.dart'; import 'add_sms_page.dart'; class ContentRefusePage extends StatefulWidget { @@ -18,10 +22,11 @@ class ContentRefusePage extends StatefulWidget { } class _ContentRefusePageState extends State { - int _select = 0; - List textList = ['现在无法接听。有什么事吗?', '我马上会打给你。', '我稍后会打给你。', "自定义短信内容"]; + List textList = ['现在无法接听。有什么事吗?', '自定义短信内容']; List textListSMS = []; - List smsIdList =[]; + List smsIdList = []; + int isCheck=0; + final userProvider = Provider.of(Get.context!, listen: false); final EasyRefreshController _easyRefreshController = EasyRefreshController(); @@ -38,12 +43,18 @@ class _ContentRefusePageState extends State { super.dispose(); } - Future updateList() async{ + updateList() async { if (userProvider.isLogin) { textListSMS.clear(); + smsIdList.clear(); + int i=0; userProvider.userInfo.contentRef?.forEach((model) { textListSMS.add(model.content); smsIdList.add(model.id); + if(model.isChecked==1){ + isCheck=i; + } + i++; }); textListSMS.add("自定义短信内容"); } else { @@ -74,60 +85,75 @@ class _ContentRefusePageState extends State { _getList() { return EasyRefresh( - firstRefresh: true, - header: MaterialHeader(), - footer: MaterialFooter(), - controller: _easyRefreshController, - onRefresh: () async { - await updateList(); - }, - child:ListView.builder( - itemBuilder: (context, index) { - return _getBox(textListSMS[index], index == _select, index); + firstRefresh: true, + header: MaterialHeader(), + footer: MaterialFooter(), + controller: _easyRefreshController, + onRefresh: () async { + await userProvider.updateUserInfo(); + updateList(); + setState(() {}); }, - itemCount: textListSMS.length, - ), + child: ListView.builder( + itemBuilder: (context, index) { + return _getBox(textListSMS[index], index); + }, + itemCount: textListSMS.length, + ), ); } - _getBox(String content, bool pd, int index) { + _getBox(String content, int index) { return GestureDetector( onTap: () async { if (content != "自定义短信内容") { - _select = index; + BaseModel res = await apiClient.request(API.app.checked, + data: {'id': smsIdList[index], 'status': 2}); + if (res.code == 0) { + setState(() {}); + userProvider.updateUserInfo(); + _easyRefreshController.callRefresh(); + } else { + CloudToast.show(res.msg); + } } else { - if(userProvider.isLogin){ - if(textListSMS.length>5){ + if (userProvider.isLogin) { + if (textListSMS.length > 5) { BotToast.showText(text: '自定义数量已达上限,请先删除不需要的短信'); - }else{ + } else { Get.to(AddSmsPage( - status: 2, ploneBack: (String textContent) { }, + status: 2, + ploneBack: (String textContent) { + _easyRefreshController.callRefresh(); + }, )); } - }else{ + } else { BotToast.showText(text: '请先登录'); } } setState(() {}); }, onLongPress: () { - if(content != "自定义短信内容"){ - if (textListSMS.length<2 ) { + if (content != "自定义短信内容") { + if (textListSMS.length == 1) { BotToast.showText(text: '不能再删了'); - }else{ + } else { showDialog( context: context, builder: (context) { - return Centertipsalterwidget( + return Centertipsalterwidget( desText: '你确定要删除这个短信模版吗,删除之后无法还原。', - title: '删除短信模板', id: smsIdList[index], + title: '删除短信模板', + id: smsIdList[index], + callback: (bool status) { + _easyRefreshController.callRefresh(); + }, ); }); } } - setState(() { - _easyRefreshController.callRefresh(); - }); + setState(() {}); }, child: Container( // width: 686.w, @@ -135,13 +161,13 @@ class _ContentRefusePageState extends State { padding: EdgeInsets.all(40.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(16), - color: pd ? const Color(0xFF72E4C8) : const Color(0xFFF9F9F9), + color: index==isCheck?const Color(0xFF72E4C8) :const Color(0xFFF9F9F9), ), child: Text( content, style: TextStyle( fontSize: BaseStyle.fontSize28, - color: pd ? const Color(0xFFF9F9F9) : BaseStyle.color333333, + color: index==isCheck?const Color(0xFFF9F9F9):BaseStyle.color333333, fontWeight: FontWeight.bold), ), ), diff --git a/lib/ui/login/login_page.dart b/lib/ui/login/login_page.dart index aad13c0..deb6dbb 100644 --- a/lib/ui/login/login_page.dart +++ b/lib/ui/login/login_page.dart @@ -131,6 +131,7 @@ class _LoginPageState extends State { var base = await apiClient.request(API.app.login, data: {'phone': _phoneController.text, 'code': _smsCodeController.text}); if (base.code == 0) { + print(base.data['token']); await UserTool.userProvider.setToken(base.data['token']); Get.offAll(() => const TabNavigator()); } else { @@ -293,7 +294,6 @@ class _LoginPageState extends State { if (kDebugMode) { print("点击协议了"); } - ///跳转到用户协议页面 }; return recognizer; diff --git a/lib/ui/user/user_page.dart b/lib/ui/user/user_page.dart index 3686409..23481da 100644 --- a/lib/ui/user/user_page.dart +++ b/lib/ui/user/user_page.dart @@ -1,29 +1,20 @@ - -import 'package:bot_toast/bot_toast.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:permission_handler_platform_interface/permission_handler_platform_interface.dart'; - import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/ui/login/login_page.dart'; - import 'package:project_telephony/ui/tab_navigator.dart'; import 'package:project_telephony/ui/user/content_authority_page.dart'; import 'package:project_telephony/ui/user/members_page.dart'; import 'package:project_telephony/ui/user/privacy_rights_page.dart'; import 'package:project_telephony/ui/widget/image_scaffold.dart'; import 'package:project_telephony/ui/widget/plone_bottom.dart'; -import 'package:project_telephony/ui/widget/plone_image_picker.dart'; import 'package:project_telephony/utils/headers.dart'; -import 'package:project_telephony/utils/permissionutils.dart'; import 'package:provider/provider.dart'; import 'package:telephony/telephony.dart'; -import 'package:velocity_x/velocity_x.dart'; - import '../../constants/api.dart'; import '../../model/network/api_client.dart'; - import '../../providers/user_provider.dart'; import '../../utils/toast/cloud_toast.dart'; import '../../utils/user_tool.dart'; @@ -44,18 +35,20 @@ class _UserPageState extends State { // bool vle = PermissionStatus.denied.isGranted; //bool vle =PermissionStatus.denied.isGranted; final userProvider = Provider.of(Get.context!, listen: false); - bool vle=false; - bool isVip=false; + bool vle = false; + bool isVip = false; + String? endDate; @override void initState() { super.initState(); - if(userProvider.isLogin){ - if(userProvider.userInfo.isVip==1){ - isVip=true; - }else{ - isVip=false; + if (userProvider.isLogin) { + if (userProvider.userInfo.isVip == 1) { + isVip = true; + } else { + isVip = false; } + endDate=DateUtil.formatDateMs(userProvider.userInfo.end * 1000, format: DateFormats.y_mo_d); } } @@ -74,10 +67,10 @@ class _UserPageState extends State { 72.hb, _getBanner(), 120.hb, - _getSwitch(Assets.icons.switch1.path, "功能开关", true), + _getSwitch(Assets.icons.switch1.path, "功能开关", true), _getSwitch(Assets.icons.privacy.path, "隐私政策", false), - _getSwitch(Assets.icons.permissions.path, "权限说明", false), - _getSwitch(Assets.icons.sms.path, "短信标签", false), + _getSwitch(Assets.icons.permissions.path, "权限说明", false), + _getSwitch(Assets.icons.sms.path, "短信标签", false), // const Spacer(), 182.hb, userProvider.isLogin @@ -136,15 +129,15 @@ class _UserPageState extends State { const Spacer(), GestureDetector( onTap: () async { - var value = await CloudImagePicker.pickSingleImage(title: '选择图片'); - if (value != null) { - BotToast.showText(text: '头像成功'); - setState(() {}); - } + // var value = await CloudImagePicker.pickSingleImage(title: '选择图片'); + // if (value != null) { + // BotToast.showText(text: '头像成功'); + // setState(() {}); + // }//暂时不开放头像更改 }, child: ClipOval( child: Image.asset( - Assets.images.portrait.path, + userProvider.isLogin?Assets.images.portraitDeep.path:Assets.images.portrait.path, height: 128.w, width: 128.w, fit: BoxFit.cover, @@ -152,7 +145,6 @@ class _UserPageState extends State { ), ) ], - ), ); } @@ -200,7 +192,7 @@ class _UserPageState extends State { begin: Alignment.centerLeft, end: Alignment.centerRight)), child: Text( - isVip?"立即续费":"立即购买", + isVip ? "立即续费" : "立即购买", style: TextStyle( color: const Color(0xFF001F3F), fontSize: BaseStyle.fontSize24), )), @@ -215,7 +207,7 @@ class _UserPageState extends State { _getVip(), 16.hb, Text( - isVip?"{$userProvider.userInfo.end}到期":"解锁全部功能", + isVip ? "$endDate到期" : "解锁全部功能", style: TextStyle(color: Colors.white, fontSize: BaseStyle.fontSize24), ) ], @@ -243,7 +235,7 @@ class _UserPageState extends State { ), ), Text( - isVip?"已成为会员":"未开通会员", + isVip ? "已成为会员" : "未开通会员", style: const TextStyle( color: Color( 0xFFFFEAB0, @@ -258,26 +250,25 @@ class _UserPageState extends State { _getSwitch(String url, String name, bool pd) { return GestureDetector( onTap: () async { - - if(!pd){ - switch(name){ + if (!pd) { + switch (name) { case "短信标签": Get.to(() => ContentDetailsPage( - content: - userProvider.isLogin ? userProvider.userInfo.tag : "", - ploneBack: (String textContent) { - // print("这是数据" + textContent); - // textList.setAll(index, {textContent}); - }, - )); + content: + userProvider.isLogin ? userProvider.userInfo.tag : "", + ploneBack: (String textContent) { + // print("这是数据" + textContent); + // textList.setAll(index, {textContent}); + }, + )); break; - case"隐私政策": + case "隐私政策": Get.to(() => const ContentAuthorityPage()); break; - case"权限说明": + case "权限说明": Get.to(() => PrivacyRightsPage( - name: name, - )); + name: name, + )); break; default: break; @@ -321,8 +312,7 @@ class _UserPageState extends State { // setState(() { // vle = value; // }); - } - ) + }) : const Icon(Icons.keyboard_arrow_right)), ), ); diff --git a/lib/ui/widget/centertipsalterwidget.dart b/lib/ui/widget/centertipsalterwidget.dart index 11513a5..ccbe800 100644 --- a/lib/ui/widget/centertipsalterwidget.dart +++ b/lib/ui/widget/centertipsalterwidget.dart @@ -9,12 +9,17 @@ import '../../model/network/base_model.dart'; import '../../providers/user_provider.dart'; import '../../utils/toast/cloud_toast.dart'; + +typedef Callback = Function(bool status); + class Centertipsalterwidget extends StatefulWidget { final String title; final String desText; final int id; + final Callback callback; + const Centertipsalterwidget( - {Key? key, required this.desText, required this.title, required this.id}) + {Key? key, required this.desText, required this.title, required this.id, required this.callback}) : super(key: key); @override @@ -45,6 +50,7 @@ class _CentertipsalterwidgetState extends State { style: TextStyle(color: Color(0xFF999999)), ), onPressed: () { + widget.callback(false); Navigator.pop(context); }, ), @@ -60,6 +66,7 @@ class _CentertipsalterwidgetState extends State { } else { CloudToast.show(res.msg); } + widget.callback(true); Navigator.pop(context); }, ) diff --git a/pubspec.lock b/pubspec.lock index f4e88fb..e4dc2ce 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "40.0.0" + version: "46.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "4.1.0" + version: "4.6.0" archive: dependency: transitive description: @@ -112,7 +112,7 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.4.0" + version: "8.4.1" call_log: dependency: "direct main" description: @@ -161,7 +161,7 @@ packages: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "4.1.0" + version: "4.2.0" collection: dependency: transitive description: @@ -287,7 +287,7 @@ packages: name: equatable url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" fake_async: dependency: transitive description: @@ -308,7 +308,7 @@ packages: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.2" + version: "6.1.4" fixnum: dependency: transitive description: @@ -397,7 +397,7 @@ packages: name: flutter_native_splash url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.3.3" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -470,7 +470,7 @@ packages: name: grinder url: "https://pub.dartlang.org" source: hosted - version: "0.9.1" + version: "0.9.2" highlight: dependency: transitive description: @@ -743,7 +743,7 @@ packages: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.12" + version: "2.0.19" path_provider_ios: dependency: transitive description: @@ -820,7 +820,7 @@ packages: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "5.0.0" platform: dependency: transitive description: @@ -876,7 +876,7 @@ packages: name: pubspec_parse url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" rational: dependency: transitive description: @@ -946,7 +946,7 @@ packages: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.2" shelf_web_socket: dependency: transitive description: @@ -1079,7 +1079,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" universal_io: dependency: transitive description: @@ -1128,7 +1128,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.5.2" + version: "2.6.1" xdg_directories: dependency: transitive description: @@ -1142,7 +1142,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "5.4.1" yaml: dependency: "direct dev" description: @@ -1151,5 +1151,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.17.0-206.0.dev <3.0.0" - flutter: ">=2.8.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=2.8.1"