博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Unity_UIWidgets学习笔记07_组件Scaffold
阅读量:6857 次
发布时间:2019-06-26

本文共 1893 字,大约阅读时间需要 6 分钟。

1、构造方法

public Scaffold(            Key key = null,            PreferredSizeWidget appBar = null,//显示在界面顶部的一个 AppBar            Widget body = null,//当前界面所显示的主要内容             Widget floatingActionButton = null,//界面的主要功能按钮            FloatingActionButtonLocation floatingActionButtonLocation = null,//floatingActionButton的位置            FloatingActionButtonAnimator floatingActionButtonAnimator = null,//floatingActionButton的动作            List
persistentFooterButtons = null,//固定在下方显示的按钮,比如对话框下方的确定、取消按钮。 Widget drawer = null,//抽屉菜单控件。 Widget endDrawer = null, Widget bottomNavigationBar = null,//底部小工具 Widget bottomSheet = null,//底部一直显示小工具 Color backgroundColor = null,//背景颜色 bool? resizeToAvoidBottomPadding = null,//控制界面内容 body 是否重新布局来避免底部被覆盖了,比如当键盘显示的时候,重新布局避免被键盘盖住内容。默认值为 true。 bool? resizeToAvoidBottomInset = null, bool primary = true,//此应用栏是否显示在屏幕顶部 DragStartBehavior drawerDragStartBehavior = DragStartBehavior.down//确定处理拖动开始行为的方式 )

2、例子

new MaterialApp(            home:new Scaffold(               appBar:new AppBar(                   title:new Text("AppBar")               ),               body:new Center(                   child:new  Text($"点击的次数{count}")               ),               bottomNavigationBar:new BottomAppBar(                   child:new Container(height:50)               ),               floatingActionButton:new FloatingActionButton(                   onPressed:()=>{                       setState(()=>{                           count++;                       });                   },                   tooltip:"添加",                   child:new Icon(Icons.add)               ),               floatingActionButtonLocation:FloatingActionButtonLocation.centerDocked            )          );

 

转载于:https://www.cnblogs.com/PandaHome/p/11113308.html

你可能感兴趣的文章
9-1让我想起了学生时代~~
查看>>
推荐系统中所使用的混合技术介绍
查看>>
论电子病历控件的现状和发展方向
查看>>
PHP7.27: pdf
查看>>
谷歌用户体验设计准则
查看>>
LaTeX中的数学公式
查看>>
计算二重定积分
查看>>
asp.net Web项目中c#读取域用户名的方法
查看>>
linux下安装apache及php
查看>>
重绘TabControl
查看>>
Python Decorator
查看>>
delphi debug release区别是什么?
查看>>
理解Docker容器的进程管理
查看>>
微信小程序独家秘笈之左滑删除
查看>>
Using Oracle's Parallel Execution Features
查看>>
[轉]发布时出现PHP has encountered a Stack overflow 解决办法
查看>>
substitute Simple JavaScript Template :
查看>>
9、如何清空流及缓存
查看>>
gvim汉化及配置
查看>>
ubuntu下JMF RTP不支持单播接收
查看>>