Home > Mobile >  error: the method ´flatbutton´ isn´t defined for the class
error: the method ´flatbutton´ isn´t defined for the class

Time:09-08

recently I realized that there was a flutter update, I am trying to debug an app that I have tested before, right now the console throws me the following errors:

here is a screenshot of my error

error: the method ´flatbutton´ isn´t defined for the class

I am a newbie in flutter please if someone could help I would appreciate it

CodePudding user response:

FlatButton was deprecated and in the new Flutter version you should use TextButton or OutlinedButton to replace it

CodePudding user response:

A new set of basic material button widgets and themes have been added to Flutter. The original classes have been deprecated and will eventually be removed. The overall goal is to make buttons more flexible, and easier to configure via constructor parameters or themes.

See docs for more info and the New Widgets to use.

  • Related