title: 'showSnackBar' and 'flatbutton' is deprecated and shouldn't be used
body: <p>Trying to figure out this flutter problem. The below code has the flatbutton and showSnackbar as deprecated, and am trying to figure out with the fix is.</p>
  <p>Any help is appreciated.</p>
  <pre><code>final GlobalKey&lt;ScaffoldState&gt; _scaffoldKey = GlobalKey&lt;ScaffoldState&gt;();
  
  
  @override
    Widget build(BuildContext context) {
      return Scaffold(
        key: _scaffoldKey,
        appBar: AppBar(
          title: Text(&quot;Latihan 2&quot;),
          actions: [
            FlatButton(
                onPressed: () {
                  _scaffoldKey.currentState.showSnackBar(SnackBar(
                      content: Text(&quot;Anda Menekan Icon Plus&quot;),
                      duration: Duration(seconds: 3)));
                },
                child: Icon(
                  Icons.add,
                  color: Colors.white,
                )),
            FlatButton(
                onPressed: () {},
                child: Icon(
                  Icons.remove,
                  color: Colors.white,
                )),
          ],
  </code></pre>