Flutter ElevatedButton使用

2021-07-02  本文已影响0人  九月oc

ElevatedButton (

child:Text("+", style:TextStyle(fontSize:20, color: Colors.white),),

style: ElevatedButton.styleFrom(

primary: Colors.pinkAccent,//change background color of button

    onPrimary: Colors.yellow,//change text color of button

    shape:RoundedRectangleBorder(

borderRadius:BorderRadius.circular(25),

),

elevation:15.0,

),

onPressed: () {

setState(() {

_counter++;

});

},

)

上一篇 下一篇

猜你喜欢

热点阅读