title: Access the API response and print it on button click in flutter?
body: <p>In login API it returns response, I want to get the response in button onclick and print it. </p>
  
  <p>How can I do this?</p>
  
  <pre><code>   onTap: () async =&gt; {
             await propertyBloc.fetchAllCategory();
  
             &lt;some code&gt;
  
            },
  </code></pre>