Based on the documentation here, it looks like the new ScaffoldMessenger handles all SnackBars below it. If you don’t have multiple ScaffoldMessengers, you should just be able to call:
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Login failed")));