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

seo整站如何优化苏州市网站建设培训班

seo整站如何优化,苏州市网站建设培训班,网站开发工程师所需要的经验,红杉网站建设目录 前言 需求 实现 前言 最近闲着无聊学习了flutter的一下知识#xff0c;发现flutter和安卓之间#xff0c;页面开发的方式还是有较大的差异的#xff0c;众所周知#xff0c;android的页面开发都是写在xml文件中的#xff0c;而flutter直接写在代码里#xff08;da…目录 前言 需求 实现 前言 最近闲着无聊学习了flutter的一下知识发现flutter和安卓之间页面开发的方式还是有较大的差异的众所周知android的页面开发都是写在xml文件中的而flutter直接写在代码里dart文件中从目前我的认识来看两者在UI上的“套娃”方式flutter更能套简直就是“套中套”啊哈哈。比如今天的手写一个最简单的自定义按钮吧效果如下图所示 需求 带文本的普通按钮可修改字体大小和字体颜色提供修改背景色按下后的背景色支持支持圆角和边框提供点击事件的回调 这几个需求还是毕竟常用的目前没考虑渐变色和图标具体需求具体改吧 实现 本次demo的代码本身属于练手相当于flutter的hello world(毕竟我才刚了解flutter没几天。 以下是具体的代码实现 import package:flutter/material.dart;class CustomTextButton extends StatefulWidget {//按钮的宽度final double? width;//按钮的长度final double? height;final String text;final double? textSize;final Color textColor;final Color backgroundColor;final Color pressedBackgroundColor;final VoidCallback onClick;final double borderRadius;final Color borderColor;const CustomTextButton({super.key,required this.onClick,required this.text,this.textSize 16,this.width double.infinity,required this.height,this.backgroundColor Colors.white,this.pressedBackgroundColor Colors.white,this.borderRadius 0.0,this.borderColor Colors.white,this.textColor Colors.black});overrideStateCustomTextButton createState() _CustomTextButtonState(); }class _CustomTextButtonState extends StateCustomTextButton {bool _isPressed false;overrideWidget build(BuildContext context) {return ConstrainedBox(constraints:BoxConstraints.expand(width: widget.width, height: widget.height),child: GestureDetector(onTap: () {widget.onClick();},onTapDown: (details) {setState(() {_isPressed true;});},onTapUp: (details) {setState(() {_isPressed false;});},child: Container(alignment: Alignment.center,decoration: BoxDecoration(color: _isPressed? widget.pressedBackgroundColor: widget.backgroundColor,borderRadius: BorderRadius.circular(widget.borderRadius),border: Border.fromBorderSide(BorderSide(width: 1, color: widget.borderColor))),child: Text(widget.text,maxLines: 1,overflow: TextOverflow.ellipsis,style: TextStyle(color: widget.textColor,fontSize: widget.textSize,fontStyle: FontStyle.normal,),),),),);} }extension HexColor on Color {/// String is in the format aabbcc or ffaabbcc with an optional leading #.static Color fromHex(String hexString) {final buffer StringBuffer();if (hexString.length 6 || hexString.length 7) buffer.write(ff);buffer.write(hexString.replaceFirst(#, ));return Color(int.parse(buffer.toString(), radix: 16));}}代码演示如何使用这个还是非常简单易懂的有什么需要改进的地方也请大佬指示改进。 Container(margin: const EdgeInsets.only(left: 20, right: 20),child: CustomTextButton(text: 注册,textSize: 18,textColor: Colors.white,backgroundColor: HexColor.fromHex(F9AC00),pressedBackgroundColor: HexColor.fromHex(E0CE32),height: 44,borderRadius: 30,onClick: () {Fluttertoast.showToast(msg: 您按了注册,toastLength: Toast.LENGTH_SHORT,gravity: ToastGravity.BOTTOM,timeInSecForIosWeb: 1,backgroundColor: Colors.black12,textColor: Colors.black,fontSize: 14.0);},),),
http://www.hkea.cn/news/14368165/

相关文章:

  • 公司网站开发立项文档石家庄网站建设云图
  • 青岛福瀛建设集团有限公司网站网站服务器租赁费用
  • 淄博网站外包企业门户网站建设案例
  • 做轻淘客网站要多大的空间做调查问卷网站
  • 为什么做网站需要服务器浙江均泰建设有限公司网站
  • 移动网站建设查询可以做商城网站的公司吗
  • 济南网站制作厂家九江市房管局建设官方网站
  • 最新新闻热点及观点汕头整站优化
  • 石家庄网站开发建设凡科建站的优势
  • 网页设计相关网站较成功营销网站的例子
  • 单页网站与传统网站的区别做期货要看哪些网站
  • 旅行社网站的建设开题报告wordpress 不用主题
  • 微网站的优势app手机网站开发
  • 选择网站建设公司logo素材
  • 广州可以做票务商城的网站公司wordpress文章中标签
  • 网站开发专业实习报告预约挂号php网站ftp急着后台密码忘记了
  • 章丘做网站的公司静安网站开发
  • 做网站需要哪类商标wordpress 获取文章图片
  • 如何搭建高品质网站北滘网站开发
  • 台州seo网站推广费用家具网站开发报告
  • 网站建设 管理规范比较还做的调查网站
  • 做网站的基础架构六安网站优化
  • 做外文H网站秦皇岛抖音推广公司
  • 烟台网站制作策划网站流量好难做
  • shopex网站wordpress登陆不跳转
  • 网站开发规划做前端网站用什么软件写代码
  • 电商网站建设信息网站 邮箱功能 设置
  • 做网站找哪家公司最好wordpress island主题
  • 公司域名网站网站的积分系统怎么做的
  • 网站整体地图怎么做网站搜索排名和什么有关系