title: 'showSnackBar' is deprecated and shouldn't be used
body: <p>Trying to figure out this flutter problem.  The below code has the showSnackbar as deprecated, and am trying to figure out with the fix is.  The second code is my attempt to fix the problem.  A new problem comes up with &quot;The getter 'ScaffoldMessenger' isn't defined for the type 'ScaffoldState'.&quot;.  The error tells me to import material.dart file but it is already imported.</p>
  <p>Any help is appreciated.</p>
  <pre><code>              Padding(
                  padding: const EdgeInsets.all(10.0),
                  child: GestureDetector(
                    onTap: ()async{
                      if(!await authProvider.signIn()){
                        _key.currentState.showSnackBar(
                          SnackBar(content: Text(&quot;Login failed&quot;))
                        );
                      }
                    },
  
                Padding(
                  padding: const EdgeInsets.all(10.0),
                  child: GestureDetector(
                    onTap: ()async{
                      if(!await authProvider.signIn()){
                        _key.currentState.ScaffoldMessenger.of(context).showSnackBar(
                          SnackBar(content: Text(&quot;Login failed&quot;))
                        );
                      }
                    },
  </code></pre>