- Published on
Solution for “FlatButton/RaisedButton/OutlineButton is depreciated” error in Flutter
Problem: Running into "FlatButton/RaisedButton/OutlineButton is depreciated" error when running Flutter applications.

Figure 1: Depreciated Error Message for FlatButton
Solution: As stated in the Flutter docs the following widgets have been replaced by their newer counterparts:
- FlatButton -> TextButton
- RaisedButton -> ElevatedButton
- OutlineButton -> OutlinedButton
To resolve this warning just change your deprecated widget to its updated widget.
Conclusion
Thanks for reading this blog post!
If you have any questions or concerns please feel free to post a comment in this post and I will get back to you when I find the time.
If you found this article helpful please share it and make sure to follow me on Twitter and GitHub, connect with me on LinkedIn and subscribe to my YouTube channel.