I am revisiting an old code and it is giving me this error and I am not sure how to fix it..
void _showSuccessSnack() {
final snackbar = SnackBar(
content: Text(
'User $_username successfully created!',
style: new TextStyle(color: Colors.greenAccent),
),
);
_scaffoldKey.currentState!.showSnackBar(snackbar);
_formKey.currentState!.reset();
}
_scaffoldKey.currentState!.showSnackBar(snackbar); -The method 'showSnackBar' isn't defined for the the type 'ScaffoldState'
I am not sure what's the best strategy here to follow.. erase line.. replace it with something else?