Flutter Buttons Complete Guide

Flutter has multiple button types such as

  • RaisedButton
  • OutlineButton
  • FlatButton
  • IconButton

Display Raised Button on Flutter

To display RasiedButton, we need to execute following code

RaisedButton(
    child: Text("RaisedButton"),
    onpressed: (){ 
        // some code here
    })


Display FlatButton on Flutter

To display FlatButton, we need to execute following code

FlatButton(
    child: Text("FlatButton"),
    onpressed: (){ 
        // some code here
    })


Display OutlineButton on Flutter

To display OutlineButton, we need to execute following code

OutlineButton(
    child: Text("OutlineButton"),
    onpressed: (){ 
        // some code here
    })


Display IconButton on Flutter

To display IconButton, we need to execute following code

IconButton(
    icon: Icon(Icons.favorite)
    onpressed: (){ 
        // some code here
    })


Share on:

Download Source Code:


Comments: