Home > database >  Which button when to used and which one is better practice to used in flutter
Which button when to used and which one is better practice to used in flutter

Time:06-04

There are buttons out there in flutter, i am clear when to used TextButton but others button i don't understand to use it.Which one is better to used for better practice.

CodePudding user response:

TextButton (older one - FlatButton) - mainly for showing text with button tap effect.

ElevatedButton (older one - Raised button) - shows the real button with tap effect.

OutlinedButton (older one - OutlineButton) - as the name suggests, it shows outline of the button with text and tap effect.

CodePudding user response:

RaisedButton is not working so please its updated version ElevatedButton and in precties use in TextButton if you show any icon type Button so set in IconButton and Button shape make custome most use of container and Widget use InWellk.

  • Related