0
点赞
收藏
分享

微信扫一扫

[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.

 

 

举报

相关推荐

0 条评论