Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/core/common/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:path_provider/path_provider.dart';

interface class Config {
static const String environmentFolder = 'environments';
static const Duration defaultTimeout = Duration(seconds: 30);

static const debugMode = kDebugMode;
static bool testingMode = Platform.environment.containsKey('FLUTTER_TEST');
Expand Down
3 changes: 3 additions & 0 deletions lib/core/source/common/http_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class HttpServiceDio implements HttpService {
HttpServiceDio(List<Interceptor> interceptors) {
final options = BaseOptions(
baseUrl: Config.apiBaseUrl,
connectTimeout: Config.defaultTimeout,
sendTimeout: Config.defaultTimeout,
receiveTimeout: Config.defaultTimeout,
// TODO: Remove api key. It's only needed for Supabase
headers: {'apikey': Config.supabaseApiKey},
contentType: Headers.jsonContentType,
Expand Down
Loading