title: Flutter - 'showSnackBar' is deprecated - how to update?
body: <p>I have some outdated parts in my main.dart, i would like to update them, but need a little help because my knowledge is apparently insufficient, hope someone can help me :-)</p>
  <p>in this part the snack bar is out of date, as you can see in the message.</p>
  <blockquote>
  <p>'showSnackBar' is deprecated and shouldn't be used. Use
  ScaffoldMessenger.showSnackBar. This feature was deprecated after
  v1.23.0-14.0.pre..</p>
  </blockquote>
  <p>This is the associated code of my main.dart</p>
  <pre><code>  Navigator.of(context, rootNavigator: true).pop('dialog');
    Magazin.scaffoldKey.currentState!.showSnackBar(SnackBar(
      content: Text('BEIM LADEN DER POST-DATEN IST EIN FEHLER AUFGETRETEN!'),
      duration: Duration(seconds: 5),
    ));
  </code></pre>
  <p>I found this therad here in the forum but it didn't really help me ...
  <a href="https://stackoverflow.com/questions/65906662/showsnackbar-is-deprecated-and-shouldnt-be-used">&#39;showSnackBar&#39; is deprecated and shouldn&#39;t be used</a></p>