user can set url
This commit is contained in:
@@ -10,6 +10,11 @@ String connectionErrorMessage(Object error) {
|
||||
error is http.ClientException ||
|
||||
error is HandshakeException ||
|
||||
error is TlsException) {
|
||||
final msg = error.toString().toLowerCase();
|
||||
if (msg.contains('host lookup') ||
|
||||
msg.contains('no address associated with hostname')) {
|
||||
return "This device can't resolve the server hostname. On an emulator, try setting DNS to 8.8.8.8 or use a real device.";
|
||||
}
|
||||
return 'Connection to server has broken. Check API URL and network.';
|
||||
}
|
||||
return 'Network error. Please check the API URL and try again.';
|
||||
|
||||
Reference in New Issue
Block a user