File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import 'package:path_provider/path_provider.dart';
1212
1313interface class Config {
1414 static const String environmentFolder = 'environments' ;
15+ static const Duration defaultTimeout = Duration (seconds: 30 );
1516
1617 static const debugMode = kDebugMode;
1718 static bool testingMode = Platform .environment.containsKey ('FLUTTER_TEST' );
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ class HttpServiceDio implements HttpService {
5252 HttpServiceDio (List <Interceptor > interceptors) {
5353 final options = BaseOptions (
5454 baseUrl: Config .apiBaseUrl,
55+ connectTimeout: Config .defaultTimeout,
56+ sendTimeout: Config .defaultTimeout,
57+ receiveTimeout: Config .defaultTimeout,
5558 // TODO: Remove api key. It's only needed for Supabase
5659 headers: {'apikey' : Config .supabaseApiKey},
5760 contentType: Headers .jsonContentType,
You can’t perform that action at this time.
0 commit comments