@required this.onPressed, //按钮点击回调
this.textColor, //按钮文字颜色
this.disabledTextColor, //按钮禁用时的文字颜色...this.color, //按钮背景颜色
this.disabledColor,//按钮禁用时的背景颜色
this.highlightColor, //按钮按下时的背景颜色
this.splashColor..., //点击时,水波动画中水波的颜色
this.colorBrightness,//按钮主题,默认是浅色主题
this.padding, //按钮的填充
this.shape, //外形...@required this.child, //按钮的内容
})
复制代码
栗子:定义一个提交按钮
FlatButton(
color: Colors.blue,
child: Text("...3,可以应用文本样式,可以像文本一样改变字体图标颜色,大小对齐等
4,可以通过 TextSpan 和文本混用
使用 Material Design 字体图标
Flutter 默认包含了一套 Material