I was just trying out a source code that I have seen online, and I wanted to test it, however, it is giving me multiple errors because of the new update on widgets.
The source code that I am trying to run and execute is:
CodePudding user response:
This is because your version of Flutter is newer than that of the library. The library still uses FlatButton
for example which was removed as a breaking change
Replace every FlatButton
with TextButton
and for showing a SnackBar you can use:
ScaffoldMessenger.of(context).showSnackBar(snackBar);