title: how to solve BuildContexts across async gaps error flutter
body: <p>I am facing this issue and didn’t know what to do here</p>
  <pre><code>showSnackbar(
          context,
          text: StatusCodes.absenceCancelResponse[statusCode],
          color: Colors.green,
        );
  
        class StatusCode
        {
          static Map&lt;int, String&gt; absenceCancelResponse = {
                0: &quot;Absence Request Canceled Successfully&quot;,
                1: &quot;Error Cancelling Absence Request&quot;,
           };
        
        }
  </code></pre>
  <p>Everything working fine but I am annoyed by this warning</p>
  <pre><code>Do not use BuildContexts across async gaps 
  </code></pre>