flutterflutter-webflutter-http

Flutter web: How to hide alert message in the console when the HTTP status codes is failed?


I am using the API in Flutter. Sometimes the server will return failed HTTP status codes and Flutter always auto-generated the alert message with shown the API URL in the console. I don't want to shown the API URL and this alert message makes the app look not complete from the user's perspective. I want to hide these alert messages. How to do that?

Example: enter image description here


Solution

  • 'This is normal behavior for the browser' By https://github.com/flutter/flutter/issues/112155#issuecomment-1255310351

    This is a way that can clear the console -> https://stackoverflow.com/a/73862039/17798537