Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Updates flutter_map, firebase_messaging and flutter_svg to fix build due to a SDK change * Adds DIO refactor * Rollsback flutter_map, flutter_messaging and flutter_svg versions
- Loading branch information
1 parent
d4b1730
commit 50b762c
Showing
8 changed files
with
56 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:dio/dio.dart'; | ||
|
||
final Dio _dio = Dio() | ||
..options.connectTimeout = 10000 | ||
..options.receiveTimeout = 10000; | ||
|
||
Future<Response> get(String path) async { | ||
try { | ||
final Response response = await _dio.get(path); | ||
print('Resquest to $path performed with success (${response?.statusCode}).'); | ||
return response; | ||
} on DioError catch (e) { | ||
print('Request to [$path] failed with error $e and headers [${e?.response?.headers}].'); | ||
return e?.response; | ||
} | ||
} |