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

苏州学习网站建设制作网站建设

苏州学习网站建设,制作网站建设,网站维护 案例,网站开发与设计实训心得1、Align介绍 Align的作为一个参数#xff0c;设置子child的对齐方式#xff0c;比如居中#xff0c;左上#xff0c;右下等多个对齐方向 2、部分源码和功能 const Align({Key key,this.alignment Alignment.center,this.widthFactor,this.heightFactor,Widget child,}) …1、Align介绍 Align的作为一个参数设置子child的对齐方式比如居中左上右下等多个对齐方向 2、部分源码和功能 const Align({Key key,this.alignment Alignment.center,this.widthFactor,this.heightFactor,Widget child,}) : assert(alignment ! null),assert(widthFactor null || widthFactor 0.0),assert(heightFactor null || heightFactor 0.0),super(key: key, child: child); /// The top left corner.static const Alignment topLeft Alignment(-1.0, -1.0);/// The center point along the top edge.static const Alignment topCenter Alignment(0.0, -1.0);/// The top right corner.static const Alignment topRight Alignment(1.0, -1.0);/// The center point along the left edge.static const Alignment centerLeft Alignment(-1.0, 0.0);/// The center point, both horizontally and vertically.static const Alignment center Alignment(0.0, 0.0);/// The center point along the right edge.static const Alignment centerRight Alignment(1.0, 0.0);/// The bottom left corner.static const Alignment bottomLeft Alignment(-1.0, 1.0);/// The center point along the bottom edge.static const Alignment bottomCenter Alignment(0.0, 1.0);/// The bottom right corner.static const Alignment bottomRight Alignment(1.0, 1.0); 我们知道最左上角的坐标是Alignment(-1.0, -1.0),中心坐标是Alignment(0.0, 0.0);然后最右下角坐标是Alignment(1.0, 1.0); FractionalOffset对其封装了大小范围是(0~1),FractionalOffset(0, 0)对于左上角FractionalOffset(1, 1)对于右下角FractionalOffset(0.5, 0.5)对于中间坐标 FractionalOffset(0.5, 0.5) Alignment(0.0,0.0) Alignment.center 3、测试代码 测试1 overrideWidget build(BuildContext context) {return MaterialApp(title: open url,home: Scaffold(appBar: AppBar(// Here we take the value from the MyHomePage object that was created by// the App.build method, and use it to set our appbar title.title: Text(hello flutter),),body: Align(alignment: FractionalOffset(1, 0),child: Container(color: Colors.red,width: 100,height: 100,),),),);} 测试2 overrideWidget build(BuildContext context) {return MaterialApp(title: open url,home: Scaffold(appBar: AppBar(// Here we take the value from the MyHomePage object that was created by// the App.build method, and use it to set our appbar title.title: Text(hello flutter),),body: Align(alignment: FractionalOffset(0.5, 0),child: Text(chenyu),),),);} } 4、运行效果 测试1结果 项目结构如下 测试2结果
http://www.yutouwan.com/news/492053/

相关文章:

  • 手机网站和微信网站有哪些360推广和百度推广哪个好
  • 凡科网免费建站手机网站Com
  • 东莞整合网站建设wordpress无法连接ftp服务器
  • 厦门关键词优化网站免费私人直播间 哔哩哔哩
  • 电视云网站建设app广告联盟
  • 招个网站建设维护便利的集团网站建设
  • 国外做婚纱的网站凤楼网站怎么做的
  • 西安网站建设定30天网站建设实录视频
  • 肇庆建站模板源码购物网站前台功能模块分析
  • 服装网站建设方案ppt网站的设计与维护摘要
  • 请问做网站怎么赚钱模块网站建设
  • 有一个箭头的做网站的软件页面设计说明
  • 使用wampserver做响应式网站自己做电影网站违法吗
  • 建设银行的网站特点网站后台html编辑器
  • php网站实例wordpress 微信接口
  • 策划书中网站制作怎么写网站建设所用的工具
  • 定制网站建设广告作文素材网站
  • 新建的网站百度搜不到最全的提交网站入口大全
  • 怎样设计网站网站开发环境和运行环境
  • 微信端网站页面设计wordpress 统计2次
  • 建设银行泰安分行网站wordpress标签随机调用
  • 网站建设公司的公众号如何做网站豆瓣
  • 北京网站定制报价南宁建站方案
  • 中山企业手机网站建设做神马网站优
  • e时代速递搜索引擎网站建设网站规划对网站建设起到
  • 西部数据wordpress如何优化网络速度
  • 龙岗建设网站公司建设工程公司 网站
  • 酒店网站建设范文城北区工程建设信息网站
  • 天津专业做网站公司微信小程序定位权限怎么打开
  • 试述网站建设的步骤个人养老保险app下载