raisedbutton circular flutter code example

Example 1: rounded raisedbutton in flutter

RaisedButton(
                onPressed: () {},
                color: Colors.amber,
                shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(10)),
                child: Text("Click This"),
              )

Example 2: circular button in flutter

Container(
                      width: 90,
                      height: 90,
                      child: RaisedButton(onPressed: (){
                      },
                        color: Colors.deepOrange,  
                        textColor: Colors.white,
                        shape: CircleBorder(side: BorderSide.none),
                        child: Text('Login',style: TextStyle(
                            fontSize: 20.0
                        ),
                        ),
                      ),
                    )

Example 3: flutter raisedbutton example

RaisedButton(child: Text("Rock & Roll"),
                onPressed: _changeText,
                color: Colors.red,
                textColor: Colors.yellow,
                padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
                splashColor: Colors.grey,
              )

Example 4: using shape property in flutter for circular corner

shape: RoundedRectangleBorder(
  borderRadius: BorderRadius.circular(18.0),
  side: BorderSide(color: Colors.red)
),

Tags:

Dart Example