設置外部容器漸變色,按鈕顏色透明
Container( margin: EdgeInsets.only(bottom: 10), 160, height: 40, decoration: BoxDecoration( borderRadius: BorderRadius.circular(50), //漸變色 gradient: LinearGradient(colors: [ Color(0xff82b518), Color(0xff3e73b7) ]), ), child: RaisedButton( onPressed: (){}, child: Text( '確 認', style: TextStyle(fontWeight: FontWeight.bold,fontSize: 18), ), textColor: Colors.white, // 设为透明色 color: Colors.transparent, //disabledColor: Colors.black54, //按鈕被禁用時候的顏色 shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(15), ), ), ),