dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
+11 -10
View File
@@ -14,7 +14,8 @@ import 'server_exception.dart';
import 'talk_exception.dart';
import 'webuntis_exception.dart';
const String _defaultFallback = 'Etwas ist schiefgelaufen. Bitte versuche es erneut.';
const String _defaultFallback =
'Etwas ist schiefgelaufen. Bitte versuche es erneut.';
const String _tlsErrorMessage =
'Die sichere Verbindung zum Server wurde abgelehnt (Zertifikat oder TLS-Fehler). '
'Häufige Ursachen: falsche Geräte-Uhrzeit oder ein WLAN mit Anmeldeseite (z.B. Café/Hotel).';
@@ -28,9 +29,7 @@ AppException? _dioToAppException(DioException error) {
case DioExceptionType.connectionError:
return NetworkException(technicalDetails: error.message);
case DioExceptionType.badCertificate:
return const NetworkException(
userMessage: _tlsErrorMessage,
);
return const NetworkException(userMessage: _tlsErrorMessage);
case DioExceptionType.badResponse:
final status = error.response?.statusCode;
return ServerException(
@@ -40,13 +39,15 @@ AppException? _dioToAppException(DioException error) {
case DioExceptionType.cancel:
case DioExceptionType.unknown:
final inner = error.error;
if (inner is SocketException) return NetworkException(technicalDetails: inner.message);
if (inner is HandshakeException) {
return const NetworkException(
userMessage: _tlsErrorMessage,
);
if (inner is SocketException) {
return NetworkException(technicalDetails: inner.message);
}
if (inner is HandshakeException) {
return const NetworkException(userMessage: _tlsErrorMessage);
}
if (inner is FormatException) {
return ParseException(technicalDetails: inner.message);
}
if (inner is FormatException) return ParseException(technicalDetails: inner.message);
return null;
}
}