flutter里的Center是Align的子类
class Center extends Align {
const Center({ Key key, double widthFactor, double heightFactor, Widget child })
: super(key: key, widthFactor: widthFactor, heightFactor: heightFactor, child: child);
}
Align
const Align({
Key key,
this.alignment = Alignment.center,
this.widthFactor,
this.heightFactor,
Widget child, })
algnment: 子组件对齐方式,有默认值Alignment.center
widthFactor/heightFactor: 父组件宽度/高度影响因素
因素*子组件宽/高 = 父组件宽/高(父不指定)