-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #658 from bounswe/612-connect-the-annotations-with…
…-the-backend successfully fetching annotations from backend
- Loading branch information
Showing
5 changed files
with
82 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:curl_logger_dio_interceptor/curl_logger_dio_interceptor.dart'; | ||
import 'package:dio/dio.dart'; | ||
import 'package:get_it/get_it.dart'; | ||
|
||
class AnnotationService { | ||
static final Dio _dio = Dio(); | ||
static final GetIt getIt = GetIt.instance; | ||
static String baseUrl = 'http://34.105.66.254:1938/'; | ||
|
||
// static void setup() { | ||
// getIt.registerSingleton<Dio>(_dio); | ||
// } | ||
|
||
static Dio get dio => getIt<Dio>(); | ||
|
||
static Future<void> init() async { | ||
// Set up your Dio instance with interceptors, base URL, etc. | ||
dio.interceptors.add(CurlLoggerDioInterceptor(printOnSuccess: true)); | ||
dio.options.baseUrl = baseUrl; | ||
} | ||
|
||
|
||
} |
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