[Flutter]UI Guide

网友投稿 717 2022-10-07

[Flutter]UI Guide

[Flutter]UI Guide

一.手势:

GestureDetector( onTap: () { print('MyButton was tapped!'); },

the ​​IconButton​​​, ​​RaisedButton​​​, and ​​FloatingActionButton​​​ widgets have ​​onPressed​​ callbacks that are triggered when the user taps the widge

二.Stateless widgets & StatefulWidgets

Stateless widgets receive arguments from their parent widget, which they store in ​​final​​ member variables

StatefulWidgets are special widgets that know how to generate State objects, which are then used to hold state.

StatefulWidget and State are separate objects. In Flutter, these two types of objects have different life cycles.

State objects on the other hand are persistent between calls to ​​build()​​, allowing them to remember information.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:如何使用Koa2开发微信二维码扫码支付
下一篇:如何使用koa2搭建微信第三方公众平台
相关文章

 发表评论

暂时没有评论,来抢沙发吧~