title: Flutter snackbar dismiss on SnackBarAction onPressed
body: <p>I want to dismiss <code>SnackBar</code> on <code>SnackBarAction</code>'s <code>onPressed</code> method. I tried with <code>Navigator.of(context).pop();</code> but <code>SnackBar</code> is not dismissing my screen get black instead. </p>
  
  <p>Here is code: </p>
  
  <pre><code> void showInSnackBar(String value) {
  homeScaffoldKey.currentState.showSnackBar(new SnackBar(content: new Text(value),
    action: SnackBarAction(
      label: 'Dissmiss',
      textColor: Colors.yellow,
      onPressed: () {
      //  Navigator.of(context).pop();
      },
    ),));
  }
  </code></pre>