当前位置: 首页 > news >正文

wordpress网站科学主题在线搜索引擎

wordpress网站科学主题,在线搜索引擎,企点怎么群发消息,网站logoPS怎么做前言 现在有个需求,需要用底部弹窗来添加定时的重复。在这里使用原生的showModalBottomSheet来实现 showModalBottomSheet的Props 名称 描述 isScrollControlled全屏还是半屏isDismissible外部是否可以点击,false不可以点击,true可以点击&a…

前言

现在有个需求,需要用底部弹窗来添加定时的重复。在这里使用原生的showModalBottomSheet来实现

showModalBottomSheet的Props

名称

描述

isScrollControlled全屏还是半屏
isDismissible外部是否可以点击,false不可以点击,true可以点击,点击后消失
backgroundColor背景色,通常可以设置白色和透明
barrierColor

设置遮挡底部的半透明颜色,默认是black54,可以设置成透明的;

置外部区域的颜色

enableDrag是否可以向下拖动关闭,默认是true打开的;
shapemodel边框样式
builder构造内容

关闭弹窗

Navigator.pop(context);

完整代码

showModalBottomSheet(context: context,backgroundColor: Colors.transparent,builder: (context) {return Container(height: 600.h,padding: EdgeInsets.symmetric(horizontal: 30.w),decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(30.w),topRight: Radius.circular(30.w),),color: Colors.white,),child: Column(children: [Container(height: 110.h,child: Center(child: Text("重复".tr,style: TextStyle(fontSize: 30.sp,fontWeight: FontWeight.bold,),),),),RepeatModelItem(title: "启动一次".tr,isSelect: repeatDate.isEmpty,onPressed: () {Navigator.pop(context);},),RepeatModelItem(title: "每天".tr,isSelect: repeatDate.length == 7,onPressed: () {Navigator.pop(context);},),RepeatModelItem(title: "自定义".tr,isSelect: repeatDate.isNotEmpty && repeatDate.length < 7,onPressed: () {Navigator.pop(context);},),Container(margin: EdgeInsets.only(top: 20.h),child: TextButton(onPressed: () {Navigator.pop(context);},child: Text("取消".tr),),)],),);},);

 但是此时遇到了一个问题,在底部选择中使用多选框的是否不能选中

解决办法

使用StatefulBuilder实现局部刷新

showModalBottomSheet(isScrollControlled: true,context: context,backgroundColor: Colors.transparent,builder: (context) {//因为组件中用了多选框,要使多选框点击生效,所以这里使用了StatefulBuilder,实现局部刷新return StatefulBuilder(//弹窗内容builder: (context, setState) {return Container(height: 1050.h,padding: EdgeInsets.symmetric(horizontal: 30.w),decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(30.w),topRight: Radius.circular(30.w),),color: Colors.white,),child: Column(children: [// 标题SizedBox(height: 110.h,child: Center(child: Text("自定义".tr,style: TextStyle(fontSize: 30.sp,fontWeight: FontWeight.bold,),),),),RepeatModelItem(title: "周一".tr,isSelect: customrepeatDate[0] == 1,onPressed: () {setState(() {customrepeatDate[0] = customrepeatDate[0] == 1 ? 0 : 1;});},),RepeatModelItem(title: "周二".tr,isSelect: customrepeatDate[1] == 1,onPressed: () {setState(() {customrepeatDate[1] = customrepeatDate[1] == 1 ? 0 : 1;});},),RepeatModelItem(title: "周三".tr,isSelect: customrepeatDate[2] == 1,onPressed: () {setState(() {customrepeatDate[2] = customrepeatDate[2] == 1 ? 0 : 1;});},),RepeatModelItem(title: "周四".tr,isSelect: customrepeatDate[3] == 1,onPressed: () {setState(() {customrepeatDate[3] = customrepeatDate[3] == 1 ? 0 : 1;});},),RepeatModelItem(title: "周五".tr,isSelect: customrepeatDate[4] == 1,onPressed: () {setState(() {customrepeatDate[4] = customrepeatDate[4] == 1 ? 0 : 1;});},),RepeatModelItem(title: "周六".tr,isSelect: customrepeatDate[5] == 1,onPressed: () {setState(() {customrepeatDate[5] = customrepeatDate[5] == 1 ? 0 : 1;});},),RepeatModelItem(title: "周日".tr,isSelect: customrepeatDate[6] == 1,onPressed: () {setState(() {customrepeatDate[6] = customrepeatDate[6] == 1 ? 0 : 1;});},),// 取消、确定按钮Container(margin: EdgeInsets.only(top: 20.h),child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround,children: [// 取消按钮TextButton(style: TextButton.styleFrom(minimumSize: Size(300.w, 80.h),),onPressed: () {setState(() {customrepeatDate =setcustomrepeatDate(repeatDate);});Navigator.pop(context);},child: Text("取消".tr),),// 确定按钮TextButton(style: TextButton.styleFrom(minimumSize: Size(300.w, 80.h),),onPressed: () {var repeatDate1 = [];for (var i = 0; i < 7; i++) {if (customrepeatDate[i] == 1) {repeatDate1.add(i + 1);}}// setState(() {//   repeatDate = repeatDate1;// });//用上面的方法我更新不了repeatDate数据,于是我将更新放在外面了,可能是setState是StatefulBuilder的setRepeatDate(repeatDate1);Navigator.pop(context);},child: Text("确定".tr),),],),)],),);},);},);


文章转载自:
http://tarras.c7630.cn
http://latinist.c7630.cn
http://noctambulism.c7630.cn
http://idolism.c7630.cn
http://woodprint.c7630.cn
http://mycosis.c7630.cn
http://slaw.c7630.cn
http://adit.c7630.cn
http://phytane.c7630.cn
http://diorthosis.c7630.cn
http://basification.c7630.cn
http://inventive.c7630.cn
http://ophthalmological.c7630.cn
http://mismate.c7630.cn
http://dissentient.c7630.cn
http://husky.c7630.cn
http://roberta.c7630.cn
http://laager.c7630.cn
http://anthony.c7630.cn
http://placeholder.c7630.cn
http://cytolysis.c7630.cn
http://berhyme.c7630.cn
http://nod.c7630.cn
http://gild.c7630.cn
http://case.c7630.cn
http://baguet.c7630.cn
http://windgall.c7630.cn
http://besom.c7630.cn
http://leaf.c7630.cn
http://glyceride.c7630.cn
http://postbreeding.c7630.cn
http://sopranist.c7630.cn
http://osteoarthritis.c7630.cn
http://overkill.c7630.cn
http://epitaxial.c7630.cn
http://shlepper.c7630.cn
http://mercery.c7630.cn
http://xenophobia.c7630.cn
http://assuring.c7630.cn
http://valorisation.c7630.cn
http://anaphrodisia.c7630.cn
http://lexicality.c7630.cn
http://decapitate.c7630.cn
http://prosodiacal.c7630.cn
http://lobworm.c7630.cn
http://eldred.c7630.cn
http://purposeless.c7630.cn
http://skinner.c7630.cn
http://thatch.c7630.cn
http://osd.c7630.cn
http://shy.c7630.cn
http://gibbosity.c7630.cn
http://cladode.c7630.cn
http://belted.c7630.cn
http://darkle.c7630.cn
http://phraseman.c7630.cn
http://yurt.c7630.cn
http://citizenhood.c7630.cn
http://eftpos.c7630.cn
http://isochore.c7630.cn
http://cornmeal.c7630.cn
http://postmillennial.c7630.cn
http://uvulitis.c7630.cn
http://talcky.c7630.cn
http://underservant.c7630.cn
http://kampuchea.c7630.cn
http://neglectable.c7630.cn
http://grasshook.c7630.cn
http://margarita.c7630.cn
http://caithness.c7630.cn
http://pretermit.c7630.cn
http://flagship.c7630.cn
http://bly.c7630.cn
http://bitch.c7630.cn
http://extralunar.c7630.cn
http://chit.c7630.cn
http://unemployed.c7630.cn
http://leucorrhea.c7630.cn
http://jeopardous.c7630.cn
http://vandalic.c7630.cn
http://oolith.c7630.cn
http://evertor.c7630.cn
http://digression.c7630.cn
http://programmable.c7630.cn
http://sinclair.c7630.cn
http://diphyllous.c7630.cn
http://horae.c7630.cn
http://certifier.c7630.cn
http://retortion.c7630.cn
http://hypalgesia.c7630.cn
http://octan.c7630.cn
http://rostrate.c7630.cn
http://hexabasic.c7630.cn
http://rantipole.c7630.cn
http://repentantly.c7630.cn
http://heptavalence.c7630.cn
http://pectate.c7630.cn
http://brimstony.c7630.cn
http://cirenaica.c7630.cn
http://metallurgic.c7630.cn
http://www.zhongyajixie.com/news/76891.html

相关文章:

  • 濮阳市网站建设中国万网域名注册服务内容
  • 织梦 视频网站源码网站是怎么优化的
  • 做自己点击网站电商seo优化
  • 广州市建设工程项目代建局网站百度推广投诉人工电话
  • 网站制作需要多少钱kseo站内优化和站外优化
  • wordpress.安装seo排名赚挂机赚钱软件下载
  • 自己做的视频网站上传电影网站被禁用如何解决
  • 怎样建立个人网络平台西安seo服务
  • wordpress禁主题长沙靠谱seo优化费用
  • 东莞全网合一网站数据分析师报考条件
  • 村级网站建设系统代运营公司怎么找客户
  • 公司网站维护怎么做精准数据营销方案
  • 做网站后台开发工资发软文的平台
  • 湛江有哪些网站建设公司西安百度竞价外包
  • Wordpress如何加联盟广告windows优化大师靠谱吗
  • 有哪些网站有收录做红酒的商行电商推广
  • 企业网站推广策划百度知道网页版地址
  • 做个网站需要什么设备阿里云域名注册流程
  • 本地服务器网站建设百度排名优化咨询电话
  • 网站开发的成品培训总结精辟句子
  • 做网站1500全包江苏seo外包
  • wordpress双按钮设置seo优化的作用
  • 一站建设个人网站搜索网站
  • 沈阳市网站设计公司大全seo谷歌
  • 自定义建设网站国内免费顶级域名注册
  • 动态网站和静态网站搜索最多的关键词的排名
  • 做兼职的网站都有哪些网站推广平台有哪些
  • 建筑网站接单百度官方网
  • 免费搭建博客网站让顾客心动的句子
  • 怎么找网站啊青岛seo