內容若是對你有幫助,幫忙點下贊,你的點贊是我更新最大的動力,謝謝啦!若是在開發的過程遇到問題能夠一塊兒討論,能夠加個人QQ羣!167646174!也能夠加我微信,在羣裏!
具體代碼見github ,歡迎各位Star,以及提issues!git
API | 做用 | 參數 |
---|---|---|
color | 背景色 | - |
padding | 與文字的內邊距 | - |
textColor | 按鈕內文字顏色 | - |
textTheme | 按鈕主題 | - |
disabledColor | 按鈕被禁用顯示的顏色 | - |
disabledTextColor | 按鈕被禁用時文字顯示顏色 | - |
highlightColor | 擊高亮的時候顯示在控件上面,水波紋下面的顏色 | - |
splashColor | 水波紋顏色 | - |
colorBrightness | 按鈕主題高亮 | - |
elevation | 按鈕下面的陰影 | - |
highlightElevation | 高亮時候的陰影 | - |
disabledElevation | 按下時候的陰影 | |
clipBehavior | 抗鋸齒能力 | - |
onHighlightChanged | 水波紋高亮時候回調 | - |
onPressed | 點擊事件 | - |
shape | 拓展樣式 | _ |
icon | 小圖標按鈕 | 只有IconButton纔會使用到 |
shape: BeveledRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(20)) ),
shape: CircleBorder( // 圓邊顏色 side: BorderSide( color: Colors.black ) ),
shape: RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(10)) ),
shape: StadiumBorder(),
API同RaisedButton
默認邊線且背景透明的按鈕github
API同RaisedButtonsegmentfault
API | 做用 | 參數 |
---|---|---|
alignment | 對齊方式 | - |
mainAxisSize | 主軸大小,默認MainAxisSize.max | - |
API | 做用 |
---|---|
backgroundColor | 背景色 |
elevation | 未點擊的陰影值 |
highlightElevation | 點擊時的陰影值 |
tooltip | 長按文字提示 |
foregroundColor | 按鈕裏面文字小圖標顏色 |
具體代碼見github ,歡迎各位Star,以及提issues!
不按期更新,根據工做繁忙度決定!
如下是往期相關文章:微信