当前位置:网站首页>Shutter from zero 004 button assembly
Shutter from zero 004 button assembly
2022-06-30 11:15:00 【Hua Weiyun】
1、 Button
Material In component library , A variety of buttons are provided for us ,
Such as ElevatedButton 、TextButton 、 OutlinedButton etc.
in addition ,Material All button components in the library have the same feature , That's the water ripple animation effect , One more onPressed attribute , Click callback used to set the button .
ElevatedButton Float button , It has shadows and a gray background , Press after , The shadows get bigger , Here's the picture
ElevatedButton The use of buttons is very simple
ElevatedButton( onPressed: () {}, child: Text("ElevatedButton"), ),
TextButton Text button , The default background is transparent , No shadow , When pressed , There will be a background color , Here's the picture
TextButton The use of is also very simple
TextButton( onPressed: (){}, child: Text("TextButton"), )
OutlinedButton There will be a border by default , No shadow and transparent background . Press after , The color of the border will brighten 、 Background and shadow effects will appear at the same time , Here's the picture
OutlinedButton The use of is also very simple
OutlinedButton( onPressed: () {}, child: Text("OutlinedButton"), )
IconButton It's an icon button , Can generate a movie icon , Not including words , No default background , After clicking, the background animation will appear , Here's the picture
IconButton The use of is also very simple
IconButton( onPressed: () {}, icon: Icon(Icons.theater_comedy), )
Buttons with icons
In fact, these buttons we mentioned above , Most of them can be said to be a button with icon ,
because ElevatedButton 、 TextButton、OutlinedButton There is one. icon Construction correspondence , It makes it easy to create buttons with icons , Here's the picture
The code is as follows :
ElevatedButton.icon( onPressed: () {}, icon: Icon(Icons.send), label: Text("ElevatedButton"), ), TextButton.icon( onPressed: (){}, icon: Icon(Icons.safety_divider), label: Text("TextButton"), ), OutlinedButton.icon( onPressed: () {}, icon: Icon(Icons.abc), label: Text("OutlinedButton"), )
In the next section, I will introduce Pictures and Icon Use
边栏推荐
- 【leetcode 16】三数之和
- 数学(快速幂)
- 8 lines of code to achieve quick sorting, easy to understand illustrations!
- Wechat Emoji is written into the judgment, and every Emoji you send may become evidence in court
- 100 important knowledge points that SQL must master: using table aliases
- SQL必需掌握的100个重要知识点:组合查询
- H3C switch emptying configuration
- 压缩状态DP位运算
- ESP32-C3入门教程 基础篇⑪——Non-Volatile Storage (NVS) 非易失性存储参数的读写
- SQL必需掌握的100个重要知识点:创建和操纵表
猜你喜欢
China will force a unified charging interface. If Apple does not bow its head, iPhone will be kicked out of the Chinese market
8行代码实现快速排序,简单易懂图解!
电化学氧气传感器寿命、工作原理及应用介绍
Go zero micro Service Practice Series (VIII. How to handle tens of thousands of order requests per second)
Wireguard simple configuration
[STL source code analysis] iterator
OceanBase 安装 yum 源配置错误及解决办法
【STL源码剖析】容器(待补充)
WireGuard简单配置
数据库什么时候需要使用索引【杭州多测师】【杭州多测师_王sir】
随机推荐
Flutter 从零开始 004 按钮组件
20万奖金池!【阿里安全 × ICDM 2022】大规模电商图上的风险商品检测赛火热报名中!...
Line generation (Gauss elimination method, linear basis)
Time complexity and space complexity
100 important knowledge points that SQL must master: insert data
[understanding of opportunity -34]: fate is within the light cone
[leetcode 239] sliding window
经典面试题:负责的模块,针对这些功能点你是怎么设计测试用例的?【杭州多测师】【杭州多测师_王sir】...
SQL必需掌握的100个重要知识点:插入数据
Classic interview question: responsible modules, how do you design test cases for these function points? [Hangzhou multi surveyors] [Hangzhou multi surveyors \wang Sir]
以PolarDB为代表的阿里云数据库以跻身全球第一阵营
中移OneOS开发板学习入门
When does the database need to use the index [Hangzhou multi surveyors] [Hangzhou multi surveyors _ Wang Sir]
Pycharm项目使用pyinstalle打包过程中问题及解决方案
Retest the cloud native database performance: polardb is still the strongest, while tdsql-c and gaussdb have little change
中国将强制统一充电接口,苹果如不低头,iPhone将被踢出中国市场
基于HAL库的按键(KEY)库函数
Dickinson's soul chooses its companion
第一届中国数字藏品大会即将召开
Dell et Apple, deux entreprises de PC établies, se sont effondrées rapidement