設置外部容器漸變色,按鈕顏色透明

Container(
                    margin: EdgeInsets.only(bottom: 10),
                    width: 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),
                      ),
                    ),
                  ),

 

posted on 2020-03-20 11:40  诉说静风  阅读(235)  评论(0编辑  收藏  举报

Live2D
快把你的小爪子拿开!