new Scaffold(
appBar: new AppBar(
title: new Text('Welcome to Flutter'),
),
body: new Center(
//child: new Text('Hello World'),
child: new Text(wordPair.asPascalCase),
),
),
Widget
Widget 提供一个build方法来显示其他的widget
Widget build(BuildContext context) {
return new MaterialApp()
}
override 重写
限制 不确定是不是一样的
final 定义
final不能被重写
脚手架Scaffold
Widget
Widget 提供一个build方法来显示其他的widget
StatelessWidget
StatelessWidget 无状态widgt
StatefulWidget
StatefulWidget 有状态类 实现一个有状态部件必须包含2个类