樣式
- RaisedButton:凸起
- FlatButton:扁平化
- OutlineButton:邊框
- IconButton:圖示
屬性
- onPressed:按下後觸發方法,若是 null 則不能用。
RaisedButton(
child: Text('Click'),
onPressed: btnClick,
)
void btnClick() {
print('btnClick');
}
- color:按鈕顏色
RaisedButton(
child: Text('Click'),
onPressed: btnClick,
color: Color.fromARGB(255, 255, 255, 255),
)
- textColor:按鈕中顯示文字的顏色
RaisedButton(
child: Text('Click'),
onPressed: btnClick,
textColor:: Color.fromARGB(255, 255, 255, 255),
)
- elevation:按鈕陰影大小值
RaisedButton(
child: Text('Click'),
onPressed: btnClick,
elevation: 20,
)




















