25 lines
684 B
Dart
25 lines
684 B
Dart
class ApiClientConfig {
|
|
final String baseUrl;
|
|
final Duration timeout;
|
|
final Map<String, String> defaultHeaders;
|
|
final bool allowSelfSignedCertificate;
|
|
|
|
const ApiClientConfig({
|
|
required this.baseUrl,
|
|
this.timeout = const Duration(seconds: 30),
|
|
this.defaultHeaders = const {},
|
|
this.allowSelfSignedCertificate = false,
|
|
});
|
|
|
|
static const ApiClientConfig development = ApiClientConfig(
|
|
baseUrl: 'https://localhost:7182',
|
|
timeout: Duration(seconds: 30),
|
|
allowSelfSignedCertificate: true,
|
|
);
|
|
|
|
static const ApiClientConfig production = ApiClientConfig(
|
|
baseUrl: 'https://api-route.goutezplanb.com',
|
|
timeout: Duration(seconds: 30),
|
|
);
|
|
}
|