flutter-buttons
flutter-buttons
flutter-buttons

In our flutter tutorial series, we’re going to learn how to display multiple types of buttons. Flutter has multiple button types such as

  • RaisedButton
  • OutlineButton
  • FlatButton
  • IconButton

Display Raised Button on Flutter

To display RaisedButton, we need to execute the following code

RaisedButton(
    child: Text("RaisedButton"),
    onpressed: (){ 
        // some code here
    })
fluter-raisedbutton-example
fluter-raised button-example

Display FlatButton on Flutter

To display FlatButton, we need to execute the following code

FlatButton(
    child: Text("FlatButton"),
    onpressed: (){ 
        // some code here
    })
fluter-flatbutton-example
fluter-flatbutton-example

Display OutlineButton on Flutter

To display OutlineButton, we need to execute the following code

OutlineButton(
    child: Text("OutlineButton"),
    onpressed: (){ 
        // some code here
    })
fluter-outlinebutton-example
fluter-outlinebutton-example

Display IconButton on Flutter

To display IconButton, we need to execute the following code

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