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

衡阳做网站如何做好互联网营销

衡阳做网站,如何做好互联网营销,html制作简单的个人网页代码,做毕设的网站变态需求 flutter中再满足多行文本,文本内有多个样式,并且多个样式可触发事件的情况,将其中的一部分文本的下划线往下移 方式一: 实现 使用RichText组件,主要是看中里面的WidgetSpan可以穿child为一个widget 实现源…

变态需求 

flutter中再满足多行文本,文本内有多个样式,并且多个样式可触发事件的情况,将其中的一部分文本的下划线往下移

方式一:

 实现

使用RichText组件,主要是看中里面的WidgetSpan可以穿child为一个widget

实现源码

     Expanded(child: RichText(text: TextSpan(children: [TextSpan(text: MmStrings.confirmService,style:MmTextStyles.textRegular.copyWith(fontSize: 12.sp),recognizer: TapGestureRecognizer()..onTap = () {context.read<MmSignUpBloc>().add(SignAgreePrivacyChangeEvent(!state.isAgreePrivacyPolicy,),);},),WidgetSpan(child: InkWell(onTap: () {MmWebUtils.launchWebUrl("${CommonConfig.instance.apiPreConfig.webUrl}${MmStrings.serviceAgreementUrl}",);},child: Stack(clipBehavior: Clip.none,children: [Text(MmStrings.serviceAgreement,style: MmTextStyles.agreementStyle.copyWith(fontSize: 12.sp,decoration: TextDecoration.none,),),Positioned(left: 0,right: 0,bottom: -2,child: Container(height: 1,color: MmColors.colorAgreement,),)],),),),TextSpan(text: MmStrings.andThe,style:MmTextStyles.textRegular.copyWith(fontSize: 12.sp),),WidgetSpan(child: InkWell(onTap: () {MmWebUtils.launchWebUrl("${CommonConfig.instance.apiPreConfig.webUrl}${MmStrings.privacyPolicyUrl}",);},child: Stack(clipBehavior: Clip.none,children: [Text(MmStrings.privacyPolicy,style: MmTextStyles.agreementStyle.copyWith(fontSize: 12.sp,decoration: TextDecoration.none,),),Positioned(left: 0,right: 0,bottom: -2,child: Container(height: 1,color: MmColors.colorAgreement,),)],),),),TextSpan(text: ".",style:MmTextStyles.textRegular.copyWith(fontSize: 12.sp),),],),),),

上面的方式有缺点和限制:如当一行文字换行就GG

但是

方式二:

新思路 使用shadow(具体实现很简单 设置shadow

extension MmTextStyleExtension on TextStyle {TextStyle toShadowStyle({double offset = -4,double thickness = 3,bool hasUnderline = true,}) {return this.copyWith(shadows: [Shadow(color: this.color ?? Colors.black,offset: Offset(0, offset),),],decoration: hasUnderline ? TextDecoration.underline : TextDecoration.none,decorationThickness: thickness,color: Colors.transparent,);}
}

使用

Text.rich(TextSpan(children: [TextSpan(text: "example example example example example example ",style: MmTextStyles.textSemiBold.toShadowStyle(hasUnderline: false),),TextSpan(text: "underline underline underline underline underline underline underline ",style: MmTextStyles.textSemiBoldUnLiner.toShadowStyle(),),],),),

方式三:

下面的方式过于复杂不建议

Flutter-Engine 的定制实践:Text 绘制流程浅析及自定义underline的间距-CSDN博客

http://www.hrbkazy.com/news/12724.html

相关文章:

  • jquery个人网站开发下载一个百度导航
  • 网站网站建设域名免费注册
  • 淮安哪有专业做网站的公司个人怎么做互联网推广平台
  • 重庆网站建设莉谷歌aso优化
  • 虚拟网站建设步骤怎么建立网站的步骤
  • 微信怎样建网站运营培训
  • 北京好的做网站的公司有哪些济南优化网络营销
  • 网站通栏怎么做学网络与新媒体后悔死了
  • 找生产厂家的网站seo网站推广杭州
  • 有没有跟一起做网店一样的网站搜狗关键词排名查询
  • 安徽省建设信息网站博客网站
  • asp.net网站建设台州seo排名公司
  • 手机网站诊断分析郑州黑帽seo培训
  • 运城seo招聘伊春seo
  • phpcms适合做什么网站站长权重
  • wordpress后台登陆500错误长沙网址seo
  • 合肥营销网站建设价格代理公司注册
  • 广告制作公司哪家好网络推广优化seo
  • 江门外贸网站推广方案百度的广告怎么免费发布
  • 西安做网站建设镇江网站制作公司
  • 织梦软件怎么使用域名做网站海淀区seo引擎优化
  • 网站建设的安全性问题商丘seo
  • 做的差的网站电商网站建设哪家好
  • 茶叶网站源码php关键词查找
  • 公司的网站开发服务费怎么入账小网站怎么搜关键词
  • 自己做网站跟域名怎样做网站维护的主要内容
  • 郑州市建设网墨猴seo排名公司
  • 网站设计是不是会要用代码做网站推广计划
  • 改版网站收费设计网站一般多少钱
  • 如何做自己的公司网站海南百度推广开户