SocketException: Failed host lookup: 'methods.abc.com' (OS Error: No address associated with hostname, errno = 7), StackTrace :
This may not be a Flutter problem. Instead, that is OS Error
which is far more low level.
Firstly, have a check at this: Unable to resolve host "<url here>"; No address associated with hostname.
For example, if your user closed his Wifi and mobile network, then you will see this error.
Usually it is not caused by a bug in your code, but just because the user has no network - if he has no network, how can he resolve the domain name!
Thus, for me, personally, I just ignore such type of error. In other words, I do not report these errors to my backend.