fix(watch): corrige l'URL serveur et ajoute les tests associes (#186)
Aligne http_api_client.dart avec la config watch (build.gradle.kts, WatchHeartRateCollector) et couvre le comportement par des tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -18,6 +18,9 @@ final class HttpApiClient {
|
||||
defaultValue: '',
|
||||
);
|
||||
|
||||
static const androidEmulatorDefaultBaseUrl = 'http://10.0.2.2:8090';
|
||||
static const localDefaultBaseUrl = 'http://localhost:8080';
|
||||
|
||||
static String get defaultBaseUrl =>
|
||||
defaultBaseUrlFor(isAndroid: Platform.isAndroid);
|
||||
|
||||
@ -30,9 +33,9 @@ final class HttpApiClient {
|
||||
return configured;
|
||||
}
|
||||
if (isAndroid) {
|
||||
return 'http://10.0.2.2:8080';
|
||||
return androidEmulatorDefaultBaseUrl;
|
||||
}
|
||||
return 'http://localhost:8080';
|
||||
return localDefaultBaseUrl;
|
||||
}
|
||||
|
||||
final Uri baseUrl;
|
||||
|
||||
Reference in New Issue
Block a user