user can set url

This commit is contained in:
gitea
2026-03-07 22:17:33 +01:00
parent 15867bb177
commit 3c20065e03
5 changed files with 140 additions and 8 deletions
+5
View File
@@ -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.';